-
Notifications
You must be signed in to change notification settings - Fork 268
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 #2122
Conversation
ab1eded
to
2363507
Compare
gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspConfigurations.kt
Show resolved
Hide resolved
gradle-plugin/src/test/kotlin/com/google/devtools/ksp/gradle/GradleCompilationTest.kt
Outdated
Show resolved
Hide resolved
gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspConfigurations.kt
Show resolved
Hide resolved
2363507
to
c5a041d
Compare
c5a041d
to
1b09388
Compare
1b09388
to
6968aeb
Compare
@Rule | ||
@JvmField | ||
val project: TemporaryTestProject = TemporaryTestProject("playground-android-multi", "playground", useKSP2) | ||
|
||
@Test | ||
fun testDependencyResolutionCheck() { | ||
val gradleRunner = GradleRunner.create().withProjectDir(project.root).withGradleVersion("7.6.3") | ||
|
||
File(project.root, "gradle.properties").appendText("\nagpVersion=7.4.1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep this? We need to cover users of older Gradle and AGP versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only changed this because the CI test was failing with the following error:
Could not determine the dependencies of task ':workload:compileDebugKotlin'.
> Failed to install the following SDK components:
tools Android SDK Tools
It was passing for me locally, so I wasn't sure how to troubleshoot.
This test isn't really specific to AGP 7.4.1... it will fail similarly with AGP 8.7.0 if resolving dependencies early.
FWIW, there is still AGP731IT which is a similar test using AGP 7.3.1 and the same Gradle version.
But the bottom line is that I'm happy to leave this test as-is, but I don't know how to troubleshoot the test failure :)
a1a7678
to
3331de1
Compare
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 to 8.7.0 in order to test against a version of AGP with the built-in Kotlin support. This change also configures the AGP compatibility tests (AGP731IT and AGP741IT) to run one test at a time to avoid race conditions seen when the old AGP versions were trying to download SDKs simultaneously. Bug: b/362279380 Test: GradleCompilationTest
3331de1
to
7cca0af
Compare
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 to 8.7.0-beta01 in order to test against a version of AGP with the built-in Kotlin support.
Bug: b/362279380
Test: GradleCompilationTest