Skip to content

Commit b64d8fe

Browse files
committed
bump Gradle to 8.12, AGP to 8.8, Kotlin to 2.1
1 parent 6df095b commit b64d8fe

File tree

4 files changed

+15
-33
lines changed

4 files changed

+15
-33
lines changed

android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ repositories {
2121
}
2222

2323
apply plugin: "com.android.library"
24-
apply plugin: "kotlin-android"
24+
apply plugin: "org.jetbrains.kotlin.android"
2525
apply plugin: "org.jlleitschuh.gradle.ktlint"
2626

2727
android {
2828
namespace = "vn.hunghd.flutterdownloader"
2929
compileSdk = 35
3030

3131
compileOptions {
32-
sourceCompatibility JavaVersion.VERSION_1_8
33-
targetCompatibility JavaVersion.VERSION_1_8
32+
sourceCompatibility = JavaVersion.VERSION_11
33+
targetCompatibility = JavaVersion.VERSION_11
3434
}
3535

3636
kotlinOptions {
37-
jvmTarget = JavaVersion.VERSION_1_8
37+
jvmTarget = "11"
3838
// allWarningsAsErrors = true // TODO(bartekpacia): Re-enable
3939
}
4040

example/android/app/build.gradle

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,26 @@ plugins {
44
id "dev.flutter.flutter-gradle-plugin"
55
}
66

7-
def localProperties = new Properties()
8-
def localPropertiesFile = rootProject.file("local.properties")
9-
if (localPropertiesFile.exists()) {
10-
localPropertiesFile.withReader("UTF-8") { reader ->
11-
localProperties.load(reader)
12-
}
13-
}
14-
15-
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
16-
if (flutterVersionCode == null) {
17-
flutterVersionCode = "1"
18-
}
19-
20-
def flutterVersionName = localProperties.getProperty("flutter.versionName")
21-
if (flutterVersionName == null) {
22-
flutterVersionName = "1.0"
23-
}
24-
257
android {
268
namespace = "vn.hunghd.example"
279
compileSdk = 35
2810
ndkVersion = flutter.ndkVersion
2911

3012
defaultConfig {
3113
applicationId "vn.hunghd.example"
32-
minSdk = 21
33-
targetSdk = 35
34-
versionCode = flutterVersionCode.toInteger()
35-
versionName = flutterVersionName
14+
minSdk = flutter.minSdkVersion
15+
targetSdk = flutter.targetSdkVersion
16+
versionCode = flutter.versionCode
17+
versionName = flutter.versionName
3618
}
3719

3820
compileOptions {
39-
sourceCompatibility = JavaVersion.VERSION_1_8
40-
targetCompatibility = JavaVersion.VERSION_1_8
21+
sourceCompatibility = JavaVersion.VERSION_11
22+
targetCompatibility = JavaVersion.VERSION_11
4123
}
4224

4325
kotlinOptions {
44-
jvmTarget = JavaVersion.VERSION_1_8
26+
jvmTarget = "11"
4527
}
4628

4729
buildTypes {
@@ -53,5 +35,5 @@ android {
5335
}
5436

5537
flutter {
56-
source "../.."
38+
source = "../.."
5739
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

example/android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id("dev.flutter.flutter-plugin-loader")
21-
id("com.android.application") version ('8.7.2') apply false
22-
id("org.jetbrains.kotlin.android") version ("1.9.23") apply false
21+
id("com.android.application") version ("8.8.0") apply false
22+
id("org.jetbrains.kotlin.android") version ("2.1.0") apply false
2323
}
2424

2525
include(":app")

0 commit comments

Comments
 (0)