File tree Expand file tree Collapse file tree 3 files changed +44
-30
lines changed
rollbar_flutter/example/android Expand file tree Collapse file tree 3 files changed +44
-30
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,6 @@ if (localPropertiesFile.exists()) {
6
6
}
7
7
}
8
8
9
- def flutterRoot = localProperties. getProperty(' flutter.sdk' )
10
- if (flutterRoot == null ) {
11
- throw new GradleException (" Flutter SDK not found. Define location with flutter.sdk in the local.properties file." )
12
- }
13
-
14
9
def flutterVersionCode = localProperties. getProperty(' flutter.versionCode' )
15
10
if (flutterVersionCode == null ) {
16
11
flutterVersionCode = ' 1'
@@ -21,8 +16,10 @@ if (flutterVersionName == null) {
21
16
flutterVersionName = ' 1.0'
22
17
}
23
18
24
- apply plugin : ' com.android.application'
25
- apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
19
+ plugins {
20
+ id " com.android.application"
21
+ id " dev.flutter.flutter-gradle-plugin"
22
+ }
26
23
27
24
android {
28
25
compileSdkVersion flutter. compileSdkVersion
@@ -38,7 +35,7 @@ android {
38
35
39
36
defaultConfig {
40
37
applicationId " com.rollbar.flutter.example"
41
- minSdkVersion 19
38
+ minSdkVersion flutter . minSdkVersion
42
39
targetSdkVersion flutter. targetSdkVersion
43
40
versionCode flutterVersionCode. toInteger()
44
41
versionName flutterVersionName
Original file line number Diff line number Diff line change 1
- buildscript {
2
- repositories {
3
- google()
4
- mavenCentral()
5
- }
1
+ pluginManagement {
2
+ def flutterSdkPath = {
3
+ def properties = new Properties ()
4
+ file(" local.properties" ). withInputStream { properties. load(it) }
5
+ def flutterSdkPath = properties. getProperty(" flutter.sdk" )
6
+ assert flutterSdkPath != null , " flutter.sdk not set in local.properties"
7
+ return flutterSdkPath
8
+ }()
6
9
7
- dependencies {
8
- classpath ' com.android.tools.build:gradle:7.1.2'
9
- }
10
- }
10
+ includeBuild(" $flutterSdkPath /packages/flutter_tools/gradle" )
11
11
12
- allprojects {
13
12
repositories {
14
13
google()
15
14
mavenCentral()
15
+ gradlePluginPortal()
16
16
}
17
17
}
18
18
19
- rootProject. buildDir = ' ../build'
20
- subprojects {
21
- project. buildDir = " ${ rootProject.buildDir} /${ project.name} "
22
- }
23
- subprojects {
24
- project. evaluationDependsOn(' :app' )
19
+ plugins {
20
+ id " dev.flutter.flutter-plugin-loader" version " 1.0.0"
21
+ id " com.android.application" version " 7.1.2" apply false
25
22
}
26
23
27
- tasks. register(" clean" , Delete ) {
28
- delete rootProject. buildDir
29
- }
24
+ include " :app"
Original file line number Diff line number Diff line change
1
+ pluginManagement {
2
+ def flutterSdkPath = {
3
+ def properties = new Properties ()
4
+ file(" local.properties" ). withInputStream { properties. load(it) }
5
+ def flutterSdkPath = properties. getProperty(" flutter.sdk" )
6
+ assert flutterSdkPath != null , " flutter.sdk not set in local.properties"
7
+ return flutterSdkPath
8
+ }()
9
+
10
+ includeBuild(" $flutterSdkPath /packages/flutter_tools/gradle" )
11
+
12
+ repositories {
13
+ google()
14
+ mavenCentral()
15
+ gradlePluginPortal()
16
+ }
17
+ }
18
+
19
+ plugins {
20
+ id " dev.flutter.flutter-plugin-loader" version " 1.0.0"
21
+ }
22
+
1
23
include ' :app'
2
24
3
25
def localPropertiesFile = new File (rootProject. projectDir, " local.properties" )
@@ -6,6 +28,6 @@ def properties = new Properties()
6
28
assert localPropertiesFile. exists()
7
29
localPropertiesFile. withReader(" UTF-8" ) { reader -> properties. load(reader) }
8
30
9
- def flutterSdkPath = properties. getProperty(" flutter.sdk" )
10
- assert flutterSdkPath != null , " flutter.sdk not set in local.properties"
11
- apply from : " $flutterSdkPath /packages/flutter_tools/gradle/app_plugin_loader.gradle"
31
+ // def flutterSdkPath = properties.getProperty("flutter.sdk")
32
+ // assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
33
+ // apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
You can’t perform that action at this time.
0 commit comments