[Gradle] Associate Android java sources with related Kotlin Source Set

Java sources can be produced by the task or can be configured with
task dependencies. Previously sources were included into task directly
now they are properly configured with Kotlin Android Source Set.

^KT-63753 Verification Pending
^KT-65426 Verification Pending
This commit is contained in:
Anton Lakotka
2024-02-14 11:27:43 +01:00
committed by Space Team
parent b5ed2326e7
commit 020bb72d2b
8 changed files with 45 additions and 21 deletions
@@ -973,11 +973,6 @@ class KotlinAndroidMppIT : KGPBaseTest() {
defaultBuildOptions.copy(androidVersion = agpVersion),
buildJdk = jdkVersion.location
) {
// Hacks for TODO: KT-65426
val appPath = subProject("app").projectPath
appPath.resolve("src/main/java/app/example/com/app_sample").deleteRecursively()
appPath.resolve("src/commonMain/kotlin/A.kt").replaceText("expect fun f(): Unit", "")
// Code copied from the reproducer from KT-63753
subProject("app").buildGradleKts.appendText(
"""