Skip to content

Commit a8d02fb

Browse files
authored
Update android samples to target/compile android 35 and AGP/Gradle updates (#2587)
- **update AGP and gradle versions** - **[prebuilt_module] update agp and gradle** - **[prebuilt_module] targetsdk and jvm compatabiliity** Fixes flutter/flutter/152374
1 parent 3ae8c20 commit a8d02fb

File tree

6 files changed

+19
-20
lines changed

6 files changed

+19
-20
lines changed

add_to_app/plugin/android_using_plugin/app/build.gradle

+10-11
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ apply plugin: 'com.android.application'
33
apply plugin: 'kotlin-android'
44

55
android {
6-
compileSdk 34
6+
compileSdk 35
77
defaultConfig {
88
applicationId "dev.flutter.example.androidusingplugin"
99
minSdkVersion 21
10-
targetSdk 34
10+
targetSdk 35
1111
versionCode 1
1212
versionName "1.0"
1313
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -17,28 +17,27 @@ android {
1717
minifyEnabled false
1818
}
1919
}
20-
// Remove when #flutter/flutter/issues/150955 is merged to stable.
21-
lintOptions {
22-
checkReleaseBuilds false
23-
}
2420
// Keep java and kotlin versions in sync.
2521
compileOptions {
26-
sourceCompatibility 1.8
27-
targetCompatibility 1.8
22+
sourceCompatibility 17
23+
targetCompatibility 17
2824
}
2925
kotlinOptions {
30-
jvmTarget = '1.8'
26+
jvmTarget = '17'
3127
}
3228

3329
namespace 'dev.flutter.example.androidusingplugin'
30+
lint {
31+
checkReleaseBuilds false
32+
}
3433
}
3534

3635
dependencies {
3736
implementation project(':flutter')
3837
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
3938
implementation 'androidx.appcompat:appcompat:1.7.0'
40-
implementation 'androidx.core:core-ktx:1.13.1'
41-
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
39+
implementation 'androidx.core:core-ktx:1.15.0'
40+
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
4241
testImplementation 'junit:junit:4.13.2'
4342
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
4443
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'

add_to_app/plugin/android_using_plugin/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.3.2'
10+
classpath 'com.android.tools.build:gradle:8.8.1'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files
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.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

add_to_app/prebuilt_module/android_using_prebuilt_module/app/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ apply plugin: 'com.android.application'
33
apply plugin: 'kotlin-android'
44

55
android {
6-
compileSdk 34
6+
compileSdk 35
77
defaultConfig {
88
applicationId "dev.flutter.example.androidusingprebuiltmodule"
99
minSdkVersion 21
10-
targetSdkVersion 34
10+
targetSdkVersion 35
1111
versionCode 1
1212
versionName "1.0"
1313
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -19,11 +19,11 @@ android {
1919
}
2020
}
2121
compileOptions {
22-
sourceCompatibility 1.8
23-
targetCompatibility 1.8
22+
sourceCompatibility 17
23+
targetCompatibility 17
2424
}
2525
kotlinOptions {
26-
jvmTarget = '1.8'
26+
jvmTarget = '17'
2727
}
2828
namespace 'dev.flutter.example.androidusingprebuiltmodule'
2929
}

add_to_app/prebuilt_module/android_using_prebuilt_module/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.3.2'
10+
classpath 'com.android.tools.build:gradle:8.8.1'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files
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.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)