Skip to content

Commit 1562d5d

Browse files
Update build.gradle and settings.gradle files according to the reference
1 parent 73f5836 commit 1562d5d

File tree

4 files changed

+27
-39
lines changed

4 files changed

+27
-39
lines changed

example/android/app/build.gradle

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,28 @@ if (keystorePropertiesFile.exists()) {
3030
}
3131

3232
android {
33-
compileSdk = 34
33+
namespace "com.example.example"
34+
compileSdk 34
3435

35-
sourceSets {
36-
main.java.srcDirs += 'src/main/kotlin'
36+
compileOptions {
37+
sourceCompatibility JavaVersion.VERSION_17
38+
targetCompatibility JavaVersion.VERSION_17
3739
}
38-
lintOptions {
39-
disable 'InvalidPackage'
40-
checkReleaseBuilds false
40+
41+
kotlinOptions {
42+
jvmTarget = '17'
4143
}
42-
compileOptions {
43-
sourceCompatibility = JavaVersion.VERSION_1_8
44-
targetCompatibility = JavaVersion.VERSION_1_8
44+
45+
sourceSets {
46+
main.java.srcDirs += 'src/main/kotlin'
4547
}
4648

4749
defaultConfig {
48-
applicationId = "com.example.example"
49-
minSdk = 24
50-
targetSdk = 33
51-
versionCode = flutterVersionCode.toInteger()
52-
versionName = flutterVersionName
50+
applicationId "com.example.example"
51+
minSdk 24
52+
targetSdk 34
53+
versionCode flutterVersionCode.toInteger()
54+
versionName flutterVersionName
5355
}
5456

5557
buildTypes {
@@ -59,18 +61,11 @@ android {
5961
signingConfig signingConfigs.debug
6062
}
6163
}
62-
63-
buildFeatures {
64-
viewBinding true
65-
}
6664
}
6765

6866
flutter {
6967
source '../..'
7068
}
7169

7270
dependencies {
73-
implementation 'androidx.appcompat:appcompat:1.4.1'
74-
implementation 'com.google.android.material:material:1.5.0'
7571
}
76-

example/android/build.gradle

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
allprojects {
22
repositories {
33
google()
4-
maven {
5-
url 'https://maven.google.com'
6-
}
7-
jcenter()
84
mavenCentral()
95
}
106
}
117

128
rootProject.buildDir = '../build'
139
subprojects {
1410
project.buildDir = "${rootProject.buildDir}/${project.name}"
15-
}
16-
subprojects {
1711
project.evaluationDependsOn(':app')
1812
}
1913

2014
tasks.register("clean", Delete) {
2115
delete rootProject.buildDir
22-
}
16+
}

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip

example/android/settings.gradle

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
pluginManagement {
22
def flutterSdkPath = {
33
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"
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'
77
return flutterSdkPath
88
}()
99

@@ -16,10 +16,9 @@ pluginManagement {
1616
}
1717
}
1818

19-
plugins {
20-
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "7.3.0" apply false
22-
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
23-
}
24-
25-
include ":app"
19+
plugins {
20+
id 'dev.flutter.flutter-plugin-loader' version '1.0.0'
21+
id 'com.android.application' version '8.3.1' apply false
22+
id 'org.jetbrains.kotlin.android' version '1.8.22' apply false
23+
}
24+
include ':app'

0 commit comments

Comments
 (0)