Skip to content

Commit 35e5815

Browse files
committed
dont hardcode kotlin and agp version
1 parent b7f022f commit 35e5815

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/release/breaking-changes/flutter-gradle-plugin-apply.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ buildscripts.
3232

3333
### android/settings.gradle
3434

35-
Replace the contents of `<app-src>/android/settings.gradle` with:
35+
Replace the contents of `<app-src>/android/settings.gradle` with the below,
36+
remembering to replace `{{agpVersion}}` and `{{kotlinVersion}}` with previously
37+
used values:
3638

3739
```gradle
3840
pluginManagement {
@@ -56,8 +58,8 @@ pluginManagement {
5658
5759
plugins {
5860
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
59-
id "com.android.application" version "7.3.0" apply false
60-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
61+
id "com.android.application" version "{{agpVersion}}" apply false
62+
id "org.jetbrains.kotlin.android" version "{{kotlinVersion}}" apply false
6163
}
6264
6365
include ":app"
@@ -73,7 +75,7 @@ Remove the whole `buildscript` block from `<app-src/android/build.gradle`:
7375

7476
```diff
7577
-buildscript {
76-
- ext.kotlin_version = '1.7.10'
78+
- ext.kotlin_version = '{{kotlinVersion}}'
7779
- repositories {
7880
- google()
7981
- mavenCentral()
@@ -174,14 +176,15 @@ the following lines to `<app-src>/android/settings.gradle`:
174176
```diff
175177
plugins {
176178
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
177-
id "com.android.application" version "7.3.0" apply false
178-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
179+
id "com.android.application" version "{{agpVersion}}" apply false
180+
id "org.jetbrains.kotlin.android" version "{{kotlinVersion}}" apply false
179181
+ id "com.google.gms.google-services" version "4.4.0" apply false
180182
+ id "com.google.firebase.crashlytics" version "2.9.9" apply false
181183
}
182184
```
183185

184-
and the following lines to `<app-src>/android/app/build.gradle`:
186+
and the following lines to `<app-src>/android/app/build.gradle` (remembering to
187+
replace `{{agpVersion}}` and `{{kotlinVersion}}` with previously used values):
185188

186189
```diff
187190
plugins {

0 commit comments

Comments
 (0)