Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed android builder not supporting flavor as upper case. #134 #197

Merged
merged 1 commit into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading