Skip to content

Commit

Permalink
Spread version code by ABI for F-Droid inclusion (#197)
Browse files Browse the repository at this point in the history
* Spread version code by ABI for F-Droid inclusion

* fix linux build
  • Loading branch information
wuan authored Nov 24, 2022
1 parent c9b8775 commit c86d584
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
run: "flutter config --enable-linux-desktop"

- name: "Install linux build dependencies"
run: "sudo apt update && sudo apt install ninja-build libgtk-3-dev libgtkmm-3.0-dev"
run: "sudo apt update && sudo apt install ninja-build libgtk-3-dev libgtkmm-3.0-dev libfuse2"

- name: "Build for linux"
run: "flutter build linux lib/main_la.dart -v --dart-define version=${{ env.DESTINY_VERSION }}"
Expand Down
12 changes: 10 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

import com.android.build.OutputFile

android {
compileSdkVersion 31

Expand Down Expand Up @@ -76,11 +78,17 @@ android {
// Recommended by Google Play Store for testing
// https://developer.android.com/reference/tools/gradle-api/6.7/com/android/build/api/dsl/Ndk
debugSymbolLevel 'SYMBOL_TABLE'
// Flutter doesn't support x86, so we need add only supported platforms: https://docs.flutter.dev/deployment/android#what-are-the-supported-target-architectures
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
}
}

applicationVariants.all { variant ->
variant.outputs.each { output ->
def abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, x86: 3, x86_64: 4]
def abiCode = abiCodes.get(output.getFilter(OutputFile.ABI))
output.versionCodeOverride = variant.versionCode * 10 + (abiCode != null ? abiCode : 0)
}
}
}

flutter {
Expand Down

0 comments on commit c86d584

Please sign in to comment.