Skip to content

Commit

Permalink
Update android samples to target/compile android 35 and AGP/Gradle up…
Browse files Browse the repository at this point in the history
…dates (#2587)

- **update AGP and gradle versions**
- **[prebuilt_module] update agp and gradle**
- **[prebuilt_module] targetsdk and jvm compatabiliity**

Fixes flutter/flutter/152374
  • Loading branch information
reidbaker authored Feb 14, 2025
1 parent 3ae8c20 commit a8d02fb
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 20 deletions.
21 changes: 10 additions & 11 deletions add_to_app/plugin/android_using_plugin/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdk 34
compileSdk 35
defaultConfig {
applicationId "dev.flutter.example.androidusingplugin"
minSdkVersion 21
targetSdk 34
targetSdk 35
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -17,28 +17,27 @@ android {
minifyEnabled false
}
}
// Remove when #flutter/flutter/issues/150955 is merged to stable.
lintOptions {
checkReleaseBuilds false
}
// Keep java and kotlin versions in sync.
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
sourceCompatibility 17
targetCompatibility 17
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}

namespace 'dev.flutter.example.androidusingplugin'
lint {
checkReleaseBuilds false
}
}

dependencies {
implementation project(':flutter')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.core:core-ktx:1.15.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
Expand Down
2 changes: 1 addition & 1 deletion add_to_app/plugin/android_using_plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.android.tools.build:gradle:8.8.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdk 34
compileSdk 35
defaultConfig {
applicationId "dev.flutter.example.androidusingprebuiltmodule"
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -19,11 +19,11 @@ android {
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
sourceCompatibility 17
targetCompatibility 17
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}
namespace 'dev.flutter.example.androidusingprebuiltmodule'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.android.tools.build:gradle:8.8.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit a8d02fb

Please sign in to comment.