diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile index 569c086423..af6a423b0c 100644 --- a/.circleci/Dockerfile +++ b/.circleci/Dockerfile @@ -1,4 +1,7 @@ FROM circleci/android:api-28-alpha -RUN sudo apt-get install -y golang -ENV GOROOT_BOOTSTRAP /usr/lib/go +RUN \ + wget -O /tmp/go.tgz "https://golang.org/dl/go1.11.linux-amd64.tar.gz"; \ + sudo tar -C /usr/local -xzf /tmp/go.tgz; \ + rm /tmp/go.tgz +ENV PATH /usr/local/go/bin:$PATH diff --git a/.circleci/config.yml b/.circleci/config.yml index ef9d75f86b..648a46f802 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,15 +5,12 @@ jobs: docker: - image: shadowsocks/shadowsocks-android:circleci environment: - JVM_OPTS: -Xmx5g - resource_class: medium+ + JVM_OPTS: -Xmx3.5g steps: - checkout - run: git submodule update --init --recursive - restore_cache: key: jars-{{ checksum "build.gradle" }} - - restore_cache: - key: go-full-{{ checksum "~/code/.git/modules/core/src/overture/go/HEAD" }} - run: name: Run Build and Tests command: ./gradlew assembleDebug check @@ -22,10 +19,6 @@ jobs: - ~/.gradle - ~/.android/build-cache key: jars-{{ checksum "build.gradle" }} - - save_cache: - paths: - - ~/code/core/src/overture/go - key: go-full-{{ checksum "~/code/.git/modules/core/src/overture/go/HEAD" }} - store_artifacts: path: mobile/build/outputs/apk destination: apk/mobile diff --git a/.gitmodules b/.gitmodules index 43c1604d69..7fdaa3546d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -30,9 +30,6 @@ [submodule "core/src/main/jni/libev"] path = core/src/main/jni/libev url = https://github.com/shadowsocks/libev.git -[submodule "core/src/overture/go"] - path = core/src/overture/go - url = https://github.com/golang/go.git [submodule "core/src/overture/src/github.com/shadowsocks/overture"] path = core/src/overture/src/github.com/shadowsocks/overture url = https://github.com/shadowsocks/overture.git diff --git a/README.md b/README.md index 0e530f1bfe..d7cd604715 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A [shadowsocks](http://shadowsocks.org) client for Android, written in Kotlin. ### PREREQUISITES * JDK 1.8 -* Go 1.4+ +* Go 1.11+ * Android SDK - Build Tools 27+ - Android NDK r16+ @@ -26,7 +26,6 @@ but probably painful. Further contributions regarding building on Windows are al * Set environment variable `ANDROID_HOME` to `/path/to/android-sdk` * (optional) Set environment variable `ANDROID_NDK_HOME` to `/path/to/android-ndk` (default: `$ANDROID_HOME/ndk-bundle`) -* Set environment variable `GOROOT_BOOTSTRAP` to `/path/to/go` * Clone the repo using `git clone --recurse-submodules ` or update submodules using `git submodule update --init --recursive` * Build it using Android Studio or gradle script diff --git a/core/src/overture/go b/core/src/overture/go deleted file mode 160000 index 02c0c32960..0000000000 --- a/core/src/overture/go +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 02c0c32960f65d0b9c66ec840c612f5f9623dc51 diff --git a/core/src/overture/make.bash b/core/src/overture/make.bash index 6d2e8229e6..aaaade7d24 100755 --- a/core/src/overture/make.bash +++ b/core/src/overture/make.bash @@ -44,17 +44,7 @@ if [ ! -f "$ANDROID_X86_CC" ]; then --api $MIN_API --install-dir $ANDROID_X86_TOOLCHAIN fi -if [ ! -f "$DIR/go/bin/go" ]; then - echo "Build the custom go" - - pushd $DIR/go/src - try ./make.bash - popd -fi - -export GOROOT=$DIR/go export GOPATH=$DIR -export PATH=$GOROOT/bin:$GOPATH/bin:$PATH if [ ! -f "$TARGET/armeabi-v7a/liboverture.so" ] || [ ! -f "$TARGET/arm64-v8a/liboverture.so" ] || [ ! -f "$TARGET/x86/liboverture.so" ]; then