Upgrade module template AGP version (#151675)

Follow up to https://github.com/flutter/flutter/pull/151433.
This commit is contained in:
Gray Mackall 2024-08-12 11:17:41 -07:00 committed by GitHub
parent bae42ade17
commit 814e49be49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 1 deletions

View File

@ -28,7 +28,7 @@ import 'android_sdk.dart';
// Please see the README before changing any of these values. // Please see the README before changing any of these values.
const String templateDefaultGradleVersion = '8.3'; const String templateDefaultGradleVersion = '8.3';
const String templateAndroidGradlePluginVersion = '8.1.0'; const String templateAndroidGradlePluginVersion = '8.1.0';
const String templateAndroidGradlePluginVersionForModule = '7.3.0'; const String templateAndroidGradlePluginVersionForModule = '8.1.0';
const String templateKotlinGradlePluginVersion = '1.8.22'; const String templateKotlinGradlePluginVersion = '1.8.22';
// The Flutter Gradle Plugin is only applied to app projects, and modules that // The Flutter Gradle Plugin is only applied to app projects, and modules that

View File

@ -47,6 +47,22 @@ android {
} }
} }
android.buildTypes.all {buildType ->
if (!android.productFlavors.isEmpty()) {
android.productFlavors.all{productFlavor ->
android.publishing.singleVariant(productFlavor.name + buildType.name.capitalize()) {
withSourcesJar()
withJavadocJar()
}
}
} else {
android.publishing.singleVariant(buildType.name) {
withSourcesJar()
withJavadocJar()
}
}
}
flutter { flutter {
source = "../.." source = "../.."
} }