diff --git a/intercom_flutter/CHANGELOG.md b/intercom_flutter/CHANGELOG.md index c954332..bd1c385 100755 --- a/intercom_flutter/CHANGELOG.md +++ b/intercom_flutter/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 9.6.25 + +* Android: apply the Kotlin Gradle Plugin only when AGP built-in Kotlin is not active. + ## 9.6.24 * Bump Intercom Android SDK version to [18.9.1](https://github.com/intercom/intercom-android/releases/tag/18.9.1) diff --git a/intercom_flutter/android/build.gradle b/intercom_flutter/android/build.gradle index 0474d88..21b082a 100644 --- a/intercom_flutter/android/build.gradle +++ b/intercom_flutter/android/build.gradle @@ -22,7 +22,13 @@ rootProject.allprojects { } apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' + +def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0] as int +def builtInKotlin = agpMajor >= 9 && + project.findProperty('android.builtInKotlin')?.toString() != 'false' +if (!builtInKotlin) { + apply plugin: 'kotlin-android' +} android { compileSdk 36 @@ -43,8 +49,11 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } - kotlinOptions { - jvmTarget = '1.8' +} + +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8 } } diff --git a/intercom_flutter/pubspec.yaml b/intercom_flutter/pubspec.yaml index 12e1ac6..8de4e8f 100644 --- a/intercom_flutter/pubspec.yaml +++ b/intercom_flutter/pubspec.yaml @@ -1,7 +1,7 @@ name: intercom_flutter description: Flutter plugin for Intercom integration. Provides in-app messaging and help-center Intercom services -version: 9.6.24 +version: 9.6.25 homepage: https://github.com/v3rm0n/intercom_flutter dependencies: