Skip to content

[Compile]: device_info_plus, package_info_plus, share_plus apply KGP directly — will break in future Flutter versions #3900

Description

@jmontoya0

Operating System

Windows 11

Plugin

device_info_plus, package_info_plus, share_plus

Version

13.1.0 / 10.1.0 / 13.1.0

Flutter SDK

3.44.1

Compilation command

flutter build apk

Dart Dependencies

device_info_plus: ^13.1.0
package_info_plus: ^10.1.0
share_plus: ^13.1.0

Native dependencies

// Los tres plugins tienen el mismo patrón en android/build.gradle:

// device_info_plus-13.1.0
buildscript {
    ext.kotlin_version = '2.2.0'
    dependencies {
        classpath 'com.android.tools.build:gradle:8.12.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'  // ← KGP applied directly

// package_info_plus-10.1.0  →  mismo patrón
// share_plus-13.1.0         →  mismo patrón

Compilation Error

WARNING: Your app uses the following plugins that apply Kotlin Gradle Plugin (KGP): 
device_info_plus, package_info_plus, pdfx, share_plus, stripe_android

Future versions of Flutter will fail to build if your app uses plugins that apply KGP.

Please check the changelogs of these plugins and upgrade to a version that supports 
Built-in Kotlin.

Flutter Doctor

[√] Flutter (Channel stable, 3.44.1, on Microsoft Windows [Versi¢n 10.0.26200.8655], locale es-MX) [240ms]
    • Flutter version 3.44.1 on channel stable at C:\dev\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 924134a44c (4 weeks ago), 2026-05-29 12:13:22 -0400
    • Engine revision c416acfeb8
    • Dart version 3.12.1
    • DevTools version 2.57.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android,
      enable-ios, cli-animations, enable-native-assets, enable-swift-package-manager, omit-legacy-version-file,
      enable-lldb-debugging, enable-uiscene-migration

[√] Windows Version (11 Pro 64-bit, 25H2, 2009) [710ms]

[√] Android toolchain - develop for Android devices (Android SDK version 35.0.1) [1,142ms]
    • Android SDK at C:\Users\Griz\AppData\Local\Android\sdk
    • Emulator version 36.5.11.0 (build_id 15261927) (CL:N/A)
    • Platform android-36, build-tools 35.0.1
    • Java binary at: C:\Program Files\Android\Android Studio1\jbr\bin\java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.10+-14961533-b1163.108)
    • All Android licenses accepted.

[√] Chrome - develop for the web [91ms]
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.57) [90ms]
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Visual Studio Build Tools 2019 version 16.11.37327.17
    • Windows 10 SDK version 10.0.19041.0

[√] Connected device (5 available) [490ms]
    • SM P610 (wireless) (mobile)   • adb-R52NA0Y1BYJ-ydQzkV._adb-tls-connect._tcp • android-arm64  • Android 13 (API
      33)
    • sdk gphone16k x86 64 (mobile) • emulator-5554                                • android-x64    • Android 17 (API
      37) (emulator)
    • Windows (desktop)             • windows                                      • windows-x64    • Microsoft Windows
      [Versi¢n 10.0.26200.8655]
    • Chrome (web)                  • chrome                                       • web-javascript • Google Chrome
      149.0.7827.156
    • Edge (web)                    • edge                                         • web-javascript • Microsoft Edge
      149.0.4022.80

[√] Network resources [480ms]
    • All expected network resources are available.

• No issues found!

Checklist before submitting a bug

  • I searched issues in this repository and couldn't find such bug/problem
  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I'm using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions