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

Closed

Conversation

scott-pollom
Copy link
Contributor

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
Contributor 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
Contributor Author

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

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 8.7.0-beta01 in order to
test against a version of AGP with the built-in Kotlin support.

This change also makes some adjustments to compile and run tests
against AGP 8.7.0-beta01.

Bug: b/362279380
Test: GradleCompilationTest
@scott-pollom scott-pollom deleted the support_built_in_kotlin branch September 27, 2024 21:03
@scott-pollom scott-pollom restored the support_built_in_kotlin branch September 27, 2024 21:03
@scott-pollom
Copy link
Contributor Author

Created new PR here

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