diff --git a/README.md b/README.md index 24190fe..4abe99c 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ dependencyResolutionManagement { ```kotlin // app/build.gradle.kts dependencies { - implementation("com.github.phpnitro:android-engine:v1.3.0") + implementation("com.github.phpnitro:android-engine:v1.4.0") } ``` diff --git a/build.gradle.kts b/build.gradle.kts index 4f30785..05e6eae 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,11 @@ plugins { - id("com.android.library") version "8.7.2" apply false - id("org.jetbrains.kotlin.android") version "2.0.21" apply false + // 8.7.2 -> 9.0.1, matching phpnitro/phpnitro's own bump (Play Store's + // API 36 target requirement, 31/08/2026 deadline) — AGP 8.9.x caps + // out at compileSdk 35. No org.jetbrains.kotlin.android plugin: AGP + // 9.0+ bundles Kotlin support directly ("built-in Kotlin") — applying + // the separate plugin on top throws "Cannot add extension with name + // 'kotlin', as there is an extension already registered with that + // name" (confirmed against a real CI run in the monorepo). See + // developer.android.com/build/migrate-to-built-in-kotlin. + id("com.android.library") version "9.0.1" apply false } diff --git a/engine/build.gradle.kts b/engine/build.gradle.kts index 182ea3f..6c9bc25 100644 --- a/engine/build.gradle.kts +++ b/engine/build.gradle.kts @@ -1,16 +1,22 @@ plugins { id("com.android.library") - id("org.jetbrains.kotlin.android") + // AGP 9.0+ bundles Kotlin support directly (no separate + // org.jetbrains.kotlin.android plugin) — see + // developer.android.com/build/migrate-to-built-in-kotlin. id("maven-publish") } android { namespace = "com.phpnitro.engine" - compileSdk = 35 + compileSdk = 36 defaultConfig { minSdk = 24 - targetSdk = 35 + // No targetSdk here: AGP 9.0+ removed it from a LIBRARY module's + // defaultConfig DSL entirely ("Unresolved reference") — it was + // always an application-only concept (a consuming app's own + // targetSdk is what Play Store checks), vestigial on a library + // either way. } publishing { @@ -34,9 +40,8 @@ android { targetCompatibility = JavaVersion.VERSION_17 } - kotlinOptions { - jvmTarget = "17" - } + // No kotlinOptions block: built-in Kotlin derives jvmTarget from + // compileOptions.targetCompatibility above (17) by default. } // JitPack's own recipe for an Android library (jitpack.io/docs/ANDROID/):