diff --git a/flutter_google_places_sdk/example/android/app/build.gradle b/flutter_google_places_sdk/example/android/app/build.gradle index b2c02fd..709055b 100644 --- a/flutter_google_places_sdk/example/android/app/build.gradle +++ b/flutter_google_places_sdk/example/android/app/build.gradle @@ -26,15 +26,22 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 33 - ndkVersion "21.4.7075529" + namespace 'com.msh.flutter_google_places_sdk_example' + + compileSdkVersion 34 + ndkVersion "26.1.10909125" sourceSets { main.java.srcDirs += 'src/main/kotlin' } - lintOptions { - disable 'InvalidPackage' + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = '17' } defaultConfig { @@ -54,6 +61,10 @@ android { signingConfig signingConfigs.debug } } + + lint { + disable 'InvalidPackage' + } } flutter { @@ -61,7 +72,7 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation 'com.android.support:multidex:1.0.3' } diff --git a/flutter_google_places_sdk/example/android/app/src/debug/AndroidManifest.xml b/flutter_google_places_sdk/example/android/app/src/debug/AndroidManifest.xml index 6063461..f880684 100644 --- a/flutter_google_places_sdk/example/android/app/src/debug/AndroidManifest.xml +++ b/flutter_google_places_sdk/example/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/flutter_google_places_sdk/example/android/app/src/main/AndroidManifest.xml b/flutter_google_places_sdk/example/android/app/src/main/AndroidManifest.xml index 330f2dd..8770dbf 100644 --- a/flutter_google_places_sdk/example/android/app/src/main/AndroidManifest.xml +++ b/flutter_google_places_sdk/example/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/flutter_google_places_sdk/example/android/build.gradle b/flutter_google_places_sdk/example/android/build.gradle index 75ddb8e..c254645 100644 --- a/flutter_google_places_sdk/example/android/build.gradle +++ b/flutter_google_places_sdk/example/android/build.gradle @@ -1,12 +1,11 @@ buildscript { - ext.kotlin_version = '1.8.22' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.4.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/flutter_google_places_sdk/example/android/gradle.properties b/flutter_google_places_sdk/example/android/gradle.properties index a5965ab..834607e 100644 --- a/flutter_google_places_sdk/example/android/gradle.properties +++ b/flutter_google_places_sdk/example/android/gradle.properties @@ -1,4 +1,8 @@ org.gradle.jvmargs=-Xmx1536M android.enableR8=true android.useAndroidX=true -android.enableJetifier=true \ No newline at end of file +android.enableJetifier=true +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false +kotlin_version=1.9.24 \ No newline at end of file diff --git a/flutter_google_places_sdk/example/android/gradle/wrapper/gradle-wrapper.properties b/flutter_google_places_sdk/example/android/gradle/wrapper/gradle-wrapper.properties index f42e62f..510e4ef 100644 --- a/flutter_google_places_sdk/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/flutter_google_places_sdk/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/flutter_google_places_sdk_android/android/build.gradle b/flutter_google_places_sdk_android/android/build.gradle index cc00f27..6523ff3 100644 --- a/flutter_google_places_sdk_android/android/build.gradle +++ b/flutter_google_places_sdk_android/android/build.gradle @@ -2,14 +2,13 @@ group 'com.msh.flutter_google_places_sdk' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.8.22' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.4.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -25,15 +24,16 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'com.msh.flutter_google_places_sdk' - } - compileSdkVersion 30 + namespace 'com.msh.flutter_google_places_sdk_example' + compileSdkVersion 34 compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = '17' } sourceSets { @@ -41,7 +41,7 @@ android { test.java.srcDirs += 'src/test/kotlin' } defaultConfig { - minSdkVersion 16 + minSdkVersion 21 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { @@ -53,7 +53,7 @@ android { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "com.google.android.libraries.places:places:$google_places_version" testImplementation 'junit:junit:4.13.2' diff --git a/flutter_google_places_sdk_android/android/gradle.properties b/flutter_google_places_sdk_android/android/gradle.properties index 4e764f8..89be3e7 100644 --- a/flutter_google_places_sdk_android/android/gradle.properties +++ b/flutter_google_places_sdk_android/android/gradle.properties @@ -2,4 +2,5 @@ org.gradle.jvmargs=-Xmx1536M android.enableR8=true android.useAndroidX=true android.enableJetifier=true -google_places_version=3.2.0 \ No newline at end of file +google_places_version=3.2.0 +kotlin_version=1.9.24 \ No newline at end of file diff --git a/flutter_google_places_sdk_android/android/gradle/wrapper/gradle-wrapper.properties b/flutter_google_places_sdk_android/android/gradle/wrapper/gradle-wrapper.properties index 01a286e..510e4ef 100644 --- a/flutter_google_places_sdk_android/android/gradle/wrapper/gradle-wrapper.properties +++ b/flutter_google_places_sdk_android/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/flutter_google_places_sdk_android/android/src/main/AndroidManifest.xml b/flutter_google_places_sdk_android/android/src/main/AndroidManifest.xml index cf4c19f..a2f47b6 100644 --- a/flutter_google_places_sdk_android/android/src/main/AndroidManifest.xml +++ b/flutter_google_places_sdk_android/android/src/main/AndroidManifest.xml @@ -1,3 +1,2 @@ - +