Skip to content

Commit 814e49b

Browse files
authored
Upgrade module template AGP version (#151675)
Follow up to flutter/flutter#151433.
1 parent bae42ad commit 814e49b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

packages/flutter_tools/lib/src/android/gradle_utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import 'android_sdk.dart';
2828
// Please see the README before changing any of these values.
2929
const String templateDefaultGradleVersion = '8.3';
3030
const String templateAndroidGradlePluginVersion = '8.1.0';
31-
const String templateAndroidGradlePluginVersionForModule = '7.3.0';
31+
const String templateAndroidGradlePluginVersionForModule = '8.1.0';
3232
const String templateKotlinGradlePluginVersion = '1.8.22';
3333

3434
// The Flutter Gradle Plugin is only applied to app projects, and modules that

packages/flutter_tools/templates/module/android/library_new_embedding/Flutter.tmpl/build.gradle.tmpl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,22 @@ android {
4747
}
4848
}
4949

50+
android.buildTypes.all {buildType ->
51+
if (!android.productFlavors.isEmpty()) {
52+
android.productFlavors.all{productFlavor ->
53+
android.publishing.singleVariant(productFlavor.name + buildType.name.capitalize()) {
54+
withSourcesJar()
55+
withJavadocJar()
56+
}
57+
}
58+
} else {
59+
android.publishing.singleVariant(buildType.name) {
60+
withSourcesJar()
61+
withJavadocJar()
62+
}
63+
}
64+
}
65+
5066
flutter {
5167
source = "../.."
5268
}

0 commit comments

Comments
 (0)