Skip to content

AGP 9 + Kotlin 2.3#205

Open
ninovanhooff wants to merge 6 commits intodevelopfrom
feature/template-204-agp9
Open

AGP 9 + Kotlin 2.3#205
ninovanhooff wants to merge 6 commits intodevelopfrom
feature/template-204-agp9

Conversation

@ninovanhooff
Copy link
Copy Markdown
Collaborator

@ninovanhooff ninovanhooff commented Apr 3, 2026

Why is this important?

keeping up with the times

Notes

Fixes #204

@ninovanhooff ninovanhooff requested a review from Copilot April 3, 2026 11:51
@ninovanhooff ninovanhooff self-assigned this Apr 3, 2026
@ninovanhooff ninovanhooff requested a review from Vluuks April 3, 2026 11:51
@ninovanhooff ninovanhooff changed the title Feature/template 204 agp9 AGP 9 + Kotlin 2.3 Apr 3, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the project’s Gradle/Android build tooling to newer versions and adjusts build configuration to align with AGP 9.x behavior/toolchains.

Changes:

  • Bump Gradle wrapper and version-catalog tool versions (Kotlin + AGP).
  • Add Foojay toolchain resolver + introduce a daemon JVM toolchain properties file.
  • Adjust shared Gradle scripts / properties for AGP 9.x defaults and remove Kotlin Android plugin application.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
settings.gradle Adds Foojay toolchains resolver convention plugin.
gradle/wrapper/gradle-wrapper.properties Updates Gradle wrapper distribution URL.
gradle/libs.versions.toml Updates Kotlin/AGP versions and modifies plugin catalog entries.
gradle/gradle-daemon-jvm.properties Adds generated daemon JVM toolchain resolution configuration.
gradle.properties Adds AGP 9.x-related properties and comments; minor formatting update.
build.module.library.gradle Removes Kotlin Android plugin application from shared library module script.
build.module.feature-and-app.gradle Removes Kotlin Android plugin application from shared feature/app module script.
build.gradle Removes Kotlin Android plugin from root plugin classpath declarations.
build.dep.compose.gradle Removes Kotlin Android plugin application from shared Compose deps script.
.idea/gradle.xml Removes IDE-specific Gradle JVM / annotation resolution options.
Files not reviewed (1)
  • .idea/gradle.xml: Language not supported
Comments suppressed due to low confidence (1)

build.dep.compose.gradle:4

  • build.dep.compose.gradle configures Compose, but no longer applies the Kotlin Android plugin. If module-level plugins {} doesn’t apply Kotlin, Compose compilation will fail. Ensure Kotlin Android is applied consistently (preferably once in the shared module scripts).
android {
    buildFeatures {
        compose = true
    }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

apply plugin: 'kotlin-android'

apply from: "$rootDir/build.config.jvm.gradle"
apply from: "$rootDir/build.dep.di.gradle"
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

Kotlin Android plugin is no longer applied anywhere in this shared module script. Since the project contains .kt sources, Android modules that apply this script will fail to compile unless you apply the Kotlin Android plugin here (e.g., org.jetbrains.kotlin.android) or apply it in each module’s plugins {} block with an explicit version available on the classpath.

Suggested change
apply from: "$rootDir/build.dep.di.gradle"
apply from: "$rootDir/build.dep.di.gradle"
apply plugin: "org.jetbrains.kotlin.android"

Copilot uses AI. Check for mistakes.

apply from: "$rootDir/build.config.jvm.gradle"
apply from: "$rootDir/build.dep.di.gradle"
apply from: "$rootDir/build.dep.compose.gradle"
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

This shared script no longer applies the Kotlin Android plugin. Feature/app modules include Kotlin sources, so builds will fail unless the Kotlin Android plugin is applied (either in this script via apply plugin: or in each module’s plugins {} block).

Suggested change
apply from: "$rootDir/build.dep.compose.gradle"
apply from: "$rootDir/build.dep.compose.gradle"
apply plugin: 'kotlin-android'

Copilot uses AI. Check for mistakes.
Comment on lines 57 to 63
[plugins]
androidApplication = { id = "com.android.application", version.ref = "gradlePlugin" }
androidLibrary = { id = "com.android.library", version.ref = "gradlePlugin" }
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" }
firebaseCrashlyticsPlugin = { id = "com.google.firebase.crashlytics", version.ref = "crashlyticsPlugin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

The Kotlin version/AGP version are bumped, but the version-catalog plugin entry for the Kotlin Android plugin was removed. Since modules still need org.jetbrains.kotlin.android to compile Kotlin sources, keep a kotlinAndroid/jetbrainsKotlinAndroid plugin entry (or equivalent) and apply it in each Android module.

Copilot uses AI. Check for mistakes.

# android.dependency.excludeLibraryComponentsFromConstraints is DEPRECATED and will be removed in AGP 10.0.0
# omitting it however, would cause AGP 9.x to output a warning
# to supress that warning, we set android.generateSyncIssueWhenLibraryConstraintsAreEnabled to false
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

Typo in comment: “supress” → “suppress”.

Suggested change
# to supress that warning, we set android.generateSyncIssueWhenLibraryConstraintsAreEnabled to false
# to suppress that warning, we set android.generateSyncIssueWhenLibraryConstraintsAreEnabled to false

Copilot uses AI. Check for mistakes.
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.

Upgrade AGP to version 9

2 participants