Fix Kapt configuration not resolving MPP deps to JVM variants, KT-31641
This commit is contained in:
+3
@@ -283,6 +283,8 @@ class NewMultiplatformIT : BaseGradleIT() {
|
||||
|
||||
private fun doTestJvmWithJava(testJavaSupportInJvmTargets: Boolean) =
|
||||
with(Project("sample-lib", GradleVersionRequired.AtLeast("5.0"), "new-mpp-lib-and-app")) {
|
||||
embedProject(Project("sample-lib-gradle-kotlin-dsl", directoryPrefix = "new-mpp-lib-and-app"))
|
||||
|
||||
lateinit var classesWithoutJava: Set<String>
|
||||
|
||||
fun getFilePathsSet(inDirectory: String): Set<String> {
|
||||
@@ -322,6 +324,7 @@ class NewMultiplatformIT : BaseGradleIT() {
|
||||
dependencies {
|
||||
jvm6MainImplementation("com.google.dagger:dagger:2.24")
|
||||
kapt("com.google.dagger:dagger-compiler:2.24")
|
||||
kapt(project(":sample-lib-gradle-kotlin-dsl"))
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ class PluginsDslIT : BaseGradleIT() {
|
||||
}
|
||||
|
||||
private const val MAVEN_LOCAL_URL_PLACEHOLDER = "<mavenLocalUrl>"
|
||||
private const val PLUGIN_MARKER_VERSION_PLACEHOLDER = "<pluginMarkerVersion>"
|
||||
internal const val PLUGIN_MARKER_VERSION_PLACEHOLDER = "<pluginMarkerVersion>"
|
||||
|
||||
internal fun BaseGradleIT.transformProjectWithPluginsDsl(
|
||||
projectName: String,
|
||||
|
||||
+12
-5
@@ -290,10 +290,17 @@ class VariantAwareDependenciesIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun Project.embedProject(other: Project) {
|
||||
setupWorkingDir()
|
||||
other.setupWorkingDir()
|
||||
other.projectDir.copyRecursively(projectDir.resolve(other.projectName))
|
||||
projectDir.resolve("settings.gradle").appendText("\ninclude '${other.projectName}'")
|
||||
}
|
||||
|
||||
internal fun BaseGradleIT.Project.embedProject(other: BaseGradleIT.Project) {
|
||||
setupWorkingDir()
|
||||
other.setupWorkingDir()
|
||||
other.testCase.apply {
|
||||
val gradleBuildScript = other.gradleBuildScript()
|
||||
if (gradleBuildScript.extension == "kts") {
|
||||
gradleBuildScript.modify { it.replace(".version(\"$PLUGIN_MARKER_VERSION_PLACEHOLDER\")", "") }
|
||||
}
|
||||
}
|
||||
other.projectDir.copyRecursively(projectDir.resolve(other.projectName))
|
||||
projectDir.resolve("settings.gradle").appendText("\ninclude '${other.projectName}'")
|
||||
}
|
||||
Reference in New Issue
Block a user