Skip to content

Commit

Permalink
fix: Fixed android builder not supporting flavor as upper case. #134 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lijy91 authored Jun 16, 2024
1 parent cd02278 commit fca1375
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/multiple_flavors/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ android {
applicationId "org.leanflutter.examples.multiple_flavors"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 19
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand All @@ -61,13 +61,17 @@ android {
abiFilters "arm64-v8a"
}
}
googlePlay {
dimension "mode"
}
}

buildTypes {
release {
productFlavors.dev.signingConfig signingConfigs.debug
productFlavors.prod.signingConfig signingConfigs.debug
productFlavors.prod_64.signingConfig signingConfigs.debug
productFlavors.googlePlay.signingConfig signingConfigs.debug
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions examples/multiple_flavors/distribute_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ releases:
target-platform: android-arm64
dart-define:
APP_ENV: prod
- name: googleplay-apk
package:
platform: android
target: apk
build_args:
profile: true
flavor: googlePlay
- name: release-ios
jobs:
- name: release-ios-dev-ipa
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class _BuildAndroidApkResultResolver extends BuildResultResolver {
final r = _BuildAndroidApkResult(config)..duration = duration;
final String pattern = [
'${r.outputDirectory.path}/**',
config.flavor != null ? '-${config.flavor}' : '',
config.flavor != null ? '-${config.flavor!.toLowerCase()}' : '',
'-${config.mode.name}.apk',
].join();
r.outputFiles = Glob(pattern).listSync().map((e) => File(e.path)).toList();
Expand Down

0 comments on commit fca1375

Please sign in to comment.