diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd37ebf1..d63e8aee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,8 +16,11 @@ on: concurrency: group: ${{ github.ref }}-${{ github.workflow }} cancel-in-progress: true + env: CHANNEL: ${{ github.ref_type == 'tag' && endsWith(github.ref_name, 'dev') && 'dev' || github.ref_type != 'tag' && 'dev' || 'prod' }} + NDK_VERSION: '26.1.10909125' + jobs: build: permissions: write-all @@ -75,6 +78,15 @@ jobs: distribution: 'zulu' java-version: 11 + - name: Setup NDK + if: startsWith(matrix.platform,'android') + uses: nttld/setup-ndk@v1 + id: setup-ndk + with: + ndk-version: ${{ env.NDK_VERSION }} + add-to-path: true + link-to-sdk: true + - name: Setup Flutter Distributor if: ${{ !startsWith(matrix.platform,'android') }} run: | diff --git a/Makefile b/Makefile index be9871b5..445cc656 100644 --- a/Makefile +++ b/Makefile @@ -35,14 +35,15 @@ sync_translate: cd .github && bash sync_translate.sh make translate - android-release: android-apk-release android-apk-release: flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi --target $(TARGET) $(BUILD_ARGS) + ls -R build/app/outputs android-aab-release: flutter build appbundle --target $(TARGET) $(BUILD_ARGS) --dart-define release=google-play + ls -R build/app/outputs windows-release: flutter_distributor package --platform windows --targets exe $(DISTRIBUTOR_ARGS) diff --git a/android/app/build.gradle b/android/app/build.gradle index bf3ba2c7..a25ccf2c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -46,7 +46,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { namespace "com.hiddify.hiddify" compileSdkVersion flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + ndkVersion "26.1.10909125" compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -102,6 +102,7 @@ android { ndk { //noinspection ChromeOsAbiSupport abiFilters "x86_64", "armeabi-v7a", "arm64-v8a" + debugSymbolLevel 'FULL' } } } @@ -133,4 +134,4 @@ dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' implementation 'androidx.window:window:1.0.0' implementation 'androidx.window:window-java:1.0.0' -} +} \ No newline at end of file