Submission checklist
Description
I am using rive_native (via rive package) in my Flutter app and have encountered an issue with its Android build configuration.
Problem
The Android implementation (rive_native) applies the Kotlin Gradle Plugin (KGP) using apply plugin: "kotlin-android" in its build.gradle. Starting with AGP 9.0, this approach is deprecated and will cause build failures in future Flutter versions.
Current Issue
- Uses
apply plugin: "kotlin-android" in the Android module
- Uses
kotlinOptions (old syntax) instead of kotlin.compilerOptions (new syntax)
Required Changes in rive_native:
- Remove
apply plugin: "kotlin-android"
- Replace
kotlinOptions block with:
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
References
Flutter migration guide for plugin authors: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors
Flutter issue #189133: https://github.com/flutter/flutter/issues/189133
Workaround
I'm keeping android.builtInKotlin=false in gradle.properties temporarily until this is resolved.
Please migrate the Android implementation to Built-in Kotlin to ensure your users can build their apps in future Flutter versions.
Thank you!
### Reproduction steps / code
The issue occurs during Android build when using `rive_native` as a dependency via the `rive` package.
### Upload your reproduction files / stack trace
_No response_
### Source `.riv` / `.rev` file
_No response_
### Screenshots / video
_No response_
### Rive Flutter package version
0.14.10
### Flutter version
Flutter 3.44.4 • channel [user-branch] • unknown source
Framework • revision 1234567890 (some hash)
Engine • revision 1234567890
Tools • Dart 3.9.0
### Device
Infinix X6731B (Android device)
### OS version
Android 14 (API level 34)
### Additional context
The warning appears when running `flutter run` on Android. Keeping `android.builtInKotlin=false` in gradle.properties as a temporary workaround.
P.s. created and work with DeepSeek
Submission checklist
riveFlutter packageDescription
I am using
rive_native(viarivepackage) in my Flutter app and have encountered an issue with its Android build configuration.Problem
The Android implementation (
rive_native) applies the Kotlin Gradle Plugin (KGP) usingapply plugin: "kotlin-android"in itsbuild.gradle. Starting with AGP 9.0, this approach is deprecated and will cause build failures in future Flutter versions.Current Issue
apply plugin: "kotlin-android"in the Android modulekotlinOptions(old syntax) instead ofkotlin.compilerOptions(new syntax)Required Changes in
rive_native:apply plugin: "kotlin-android"kotlinOptionsblock with: