Skip to content

Commit 3551e3d

Browse files
committed
Fix plugins block ordering in app build.gradle
Move plugins block to the top of build.gradle file as required by Gradle 8.x. The plugins block must be the first statement, before any variable definitions or other code. Fixes: "only buildscript {}, pluginManagement {} and other plugins {} script blocks are allowed before plugins {} blocks"
1 parent 9f02639 commit 3551e3d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

example/android/app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
plugins {
2+
id "com.android.application"
3+
id "org.jetbrains.kotlin.android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
17
def localProperties = new Properties()
28
def localPropertiesFile = rootProject.file('local.properties')
39
if (localPropertiesFile.exists()) {
@@ -21,12 +27,6 @@ if (flutterVersionName == null) {
2127
flutterVersionName = '1.0'
2228
}
2329

24-
plugins {
25-
id "com.android.application"
26-
id "org.jetbrains.kotlin.android"
27-
id "dev.flutter.flutter-gradle-plugin"
28-
}
29-
3030
android {
3131
compileSdkVersion 34
3232
ndkVersion flutter.ndkVersion

0 commit comments

Comments
 (0)