diff --git a/pay/example/android/gradle.properties b/pay/example/android/gradle.properties index 94adc3a..eac5ff9 100644 --- a/pay/example/android/gradle.properties +++ b/pay/example/android/gradle.properties @@ -1,3 +1,7 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true +# This builtInKotlin flag was added automatically by Flutter migrator +android.builtInKotlin=false +# This newDsl flag was added automatically by Flutter migrator +android.newDsl=false diff --git a/pay/example/android/settings.gradle b/pay/example/android/settings.gradle index ba2f286..c403e19 100644 --- a/pay/example/android/settings.gradle +++ b/pay/example/android/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.3.2" apply false + id "com.android.application" version "8.6.0" apply false id "org.jetbrains.kotlin.android" version "2.0.20" apply false } diff --git a/pay_android/android/build.gradle b/pay_android/android/build.gradle index 3c28d14..45ba819 100644 --- a/pay_android/android/build.gradle +++ b/pay_android/android/build.gradle @@ -13,19 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget group 'io.flutter.plugins.pay_android' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.8.21' + ext.kotlin_version = '2.2.10' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.13.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -40,15 +41,19 @@ rootProject.allprojects { apply plugin: 'com.android.library' apply plugin: 'kotlin-android' -android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.pay_android' +kotlin { + compilerOptions { + jvmTarget = JvmTarget.fromTarget("17") } - compileSdk 34 +} + +android { + namespace = 'io.flutter.plugins.pay_android' + compileSdk = flutter.compileSdkVersion - kotlinOptions { - jvmTarget = '1.8' + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } sourceSets { diff --git a/pay_android/android/gradle/wrapper/gradle-wrapper.properties b/pay_android/android/gradle/wrapper/gradle-wrapper.properties index 1af9e09..4f5eb9d 100644 --- a/pay_android/android/gradle/wrapper/gradle-wrapper.properties +++ b/pay_android/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME