Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support AGP's built-in Kotlin compilation #2097

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

scott-pollom
Copy link

Previously, the sourceSet-specific KSP configurations (e.g., kspTest) weren't being created when AGP's built-in Kotlin compilation was enabled.

This change also increases the AGP version from 7.3.0 to 8.7.0-beta01 in order to test against a version of AGP with the built-in Kotlin support.

This change also makes several adjustments to compile and run tests against AGP 8.7.0-beta01 (e.g., increasing Gradle version to 8.9, increasing Java source and target compatibility to 11 for the ":gradle-plugin" module, etc).

Bug: b/362279380
Test: GradleCompilationTest

Previously, the sourceSet-specific KSP configurations (e.g., kspTest)
weren't being created when AGP's built-in Kotlin compilation was
enabled.

This change also increases the AGP version from 7.3.0 to 8.7.0-beta01 in
order to test against a version of AGP with the built-in Kotlin support.

This change also makes several adjustments to compile and run tests
against AGP 8.7.0-beta01 (e.g., increasing Gradle version to 8.9,
increasing Java source and target compatibility to 11 for the
":gradle-plugin" module, etc).

Bug: b/362279380
Test: GradleCompilationTest
@scott-pollom
Copy link
Author

I was able to fix most of the failing tests after updating AGP and Gradle, but the following tests still fail when I run ./gradlew test:

> Task :integration-tests:test

IncrementalCPIT > testCPChangesForFunctions[KSP2=true] FAILED
    java.lang.AssertionError at IncrementalCPIT.kt:113

IncrementalCPIT > testCPChangesForProperties[KSP2=true] FAILED
    java.lang.AssertionError at IncrementalCPIT.kt:159

IncrementalCPIT > testCPChangesForFunctions[KSP2=false] FAILED
    java.lang.AssertionError at IncrementalCPIT.kt:113

IncrementalCPIT > testCPChangesForProperties[KSP2=false] FAILED
    java.lang.AssertionError at IncrementalCPIT.kt:159

PlaygroundIT > testAllowSourcesFromOtherPlugins[KSP2=false] FAILED
    java.lang.NullPointerException at PlaygroundIT.kt:116

The IncrementalCPIT test failures look like they might be legitimate bugs. I'm not sure about the PlaygroundIT test failure yet.

@scott-pollom
Copy link
Author

I'll rebase this on top of this PR (update to Gradle 8.10) after it's merged.

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.

1 participant