Skip to content

ADFA-6180 | NDK template: build under AGP 9's built-in Kotlin - #107

Merged
Daniel-ADFA merged 1 commit into
mainfrom
fix/ADFA-6180-ndk-template-agp9-kotlin
Sep 25, 2026
Merged

Daniel-ADFA merged 1 commit into
mainfrom
fix/ADFA-6180-ndk-template-agp9-kotlin

Conversation

@Daniel-ADFA

@Daniel-ADFA Daniel-ADFA commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

ADFA-6180

Reported in appdevforall/CodeOnTheGo#2057: Kotlin NDK projects failed to configure with Error resolving plugin [id: 'org.jetbrains.kotlin.android'] ... already on the classpath.

The NDK template now matches the core templates for AGP 9:

  • Root: kotlin-gradle-plugin:${{KOTLIN_VERSION}} on the buildscript classpath.
  • App: no kotlin("android") plugin; kotlin-stdlib forces use KOTLIN_VERSION instead of 1.9.22; jvmTarget via kotlin { compilerOptions } instead of the removed kotlinOptions.
  • NDK-Installer bumped to 1.1.1.

Verified on an arm64 emulator: Kotlin and Java NDK projects both sync and build; the Kotlin app runs and shows "Hello from C++". Re-adding the kotlin("android") line reproduces the reported error.

Not covered: the Pebble custom-function templates (PCFBuilder, PCFExample) have the same bug and need their own ticket.

…tlin

AGP 9 compiles Kotlin itself and puts the Kotlin Gradle plugin on the
classpath, so the template's kotlin("android") plugin request failed with
"already on the classpath with an unknown version". Follow the core
templates: pin KGP on the root buildscript classpath, drop the plugin,
force kotlin-stdlib to KOTLIN_VERSION instead of 1.9.22, and move
jvmTarget from the removed kotlinOptions to kotlin.compilerOptions.

Bump NDK-Installer to 1.1.1.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@Daniel-ADFA
Daniel-ADFA merged commit 4fdef5d into main Sep 25, 2026
1 check passed
@Daniel-ADFA
Daniel-ADFA deleted the fix/ADFA-6180-ndk-template-agp9-kotlin branch September 25, 2026 14:52
@Daniel-ADFA

Copy link
Copy Markdown
Collaborator Author

closes appdevforall/CodeOnTheGo#2057

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants