From 1e98119c23a9a72602913cf7d2b12e22ea6f7e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 24 Jun 2021 09:53:03 +0800 Subject: [PATCH] Fix build for F-Droid --- .github/workflows/debug.yml | 8 ++++---- .github/workflows/release.yml | 10 +++++----- app/build.gradle.kts | 7 +------ bin/fdroid/prebuild.sh | 1 + bin/init/{ => action}/library.sh | 0 external/editorkit | 2 +- 6 files changed, 12 insertions(+), 16 deletions(-) rename bin/init/{ => action}/library.sh (100%) diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 0b8d7402..35bd305a 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -39,7 +39,7 @@ jobs: run: | echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - ./run init library + ./run init action library ./run lib core v2ray: name: Native Build (V2Ray) @@ -218,7 +218,7 @@ jobs: run: | echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - ./run init library + ./run init action library ./run lib shadowsocks shadowsocksr: name: Native Build (ShadowsocksR) @@ -246,7 +246,7 @@ jobs: run: | echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - ./run init library + ./run init action library ./run lib shadowsocksr build: name: Gradle Build @@ -298,5 +298,5 @@ jobs: run: | echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - ./run init library + ./run init action library ./gradlew app:assembleOssDebug \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6440044..b0c24906 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,7 +52,7 @@ jobs: run: | echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - ./run init library + ./run init action library ./run lib core v2ray: name: Native Build (V2Ray) @@ -117,7 +117,7 @@ jobs: run: | echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - ./run init library + ./run init action library ./run lib shadowsocks shadowsocksr: name: Native Build (ShadowsocksR) @@ -146,7 +146,7 @@ jobs: run: | echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - ./run init library + ./run init action library ./run lib shadowsocksr build: name: Gradle Build @@ -199,7 +199,7 @@ jobs: echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" - ./run init library + ./run init action library ./gradlew app:assembleOssRelease APK=$(find app/build/outputs/apk -name '*arm64-v8a*.apk') APK=$(dirname $APK) @@ -334,5 +334,5 @@ jobs: cat > service_account_credentials.json << EOF ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }}" EOF - ./run init library + ./run init action library ./gradlew app:publishPlayRelease \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 795b27e7..62b38e9f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -28,12 +28,7 @@ android { dependencies { - implementation(files( - "libs/libv2ray.aar", - "libs/core-release.aar", - "libs/shadowsocks-release.aar", - "libs/shadowsocksr-release.aar" - )) + implementation(fileTree("libs")) implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") implementation("androidx.core:core-ktx:1.5.0") diff --git a/bin/fdroid/prebuild.sh b/bin/fdroid/prebuild.sh index f31236a2..5b0589f7 100755 --- a/bin/fdroid/prebuild.sh +++ b/bin/fdroid/prebuild.sh @@ -2,6 +2,7 @@ source "bin/init/env.sh" +git submodule update --init 'external/*' git submodule update --init 'library/*' ## Install rust diff --git a/bin/init/library.sh b/bin/init/action/library.sh similarity index 100% rename from bin/init/library.sh rename to bin/init/action/library.sh diff --git a/external/editorkit b/external/editorkit index 30fb3d38..e84acf68 160000 --- a/external/editorkit +++ b/external/editorkit @@ -1 +1 @@ -Subproject commit 30fb3d3829e497cc7c4a7012ef35d67d489ecb07 +Subproject commit e84acf685ae51712a0b5e98ee5c4aab174664413