Update Gradle integration tests
Substituting plugin via 'pluginManagement.eachPlugin.useModule' does not work with plugin variants. ^KT-49227 In Progress
This commit is contained in:
+2
-2
@@ -84,8 +84,8 @@ class DifferentClassloadersIT : KGPBaseTest() {
|
|||||||
}
|
}
|
||||||
subProject("js-app").buildGradle.modify {
|
subProject("js-app").buildGradle.modify {
|
||||||
it.checkedReplace(
|
it.checkedReplace(
|
||||||
"id \"kotlin2js\"",
|
"id \"org.jetbrains.kotlin.js\"",
|
||||||
"id \"kotlin2js\" version \"${TestVersions.Kotlin.CURRENT}\""
|
"id \"org.jetbrains.kotlin.js\" version \"${TestVersions.Kotlin.CURRENT}\""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-3
@@ -99,8 +99,13 @@ class UpToDateIT : KGPBaseTest() {
|
|||||||
val originalPaths get() = originalCompilerCp.map { it.replace("\\", "/") }.joinToString(", ") { "'$it'" }
|
val originalPaths get() = originalCompilerCp.map { it.replace("\\", "/") }.joinToString(", ") { "'$it'" }
|
||||||
|
|
||||||
override fun initProject(project: TestProject) = with(project) {
|
override fun initProject(project: TestProject) = with(project) {
|
||||||
|
val pluginSuffix = if (project.gradleVersion < GradleVersion.version("7.0")) {
|
||||||
|
"kotlin_gradle_plugin"
|
||||||
|
} else {
|
||||||
|
"kotlin_gradle_plugin_gradle70"
|
||||||
|
}
|
||||||
buildGradle.appendText(
|
buildGradle.appendText(
|
||||||
"\nafterEvaluate { println 'compiler_cp=' + compileKotlin.getDefaultCompilerClasspath\$kotlin_gradle_plugin().toList() }"
|
"\nafterEvaluate { println 'compiler_cp=' + compileKotlin.getDefaultCompilerClasspath\$$pluginSuffix().toList() }"
|
||||||
)
|
)
|
||||||
build("clean") {
|
build("clean") {
|
||||||
originalCompilerCp = compilerClasspathRegex.find(output)!!.groupValues[1].split(", ")
|
originalCompilerCp = compilerClasspathRegex.find(output)!!.groupValues[1].split(", ")
|
||||||
@@ -111,9 +116,9 @@ class UpToDateIT : KGPBaseTest() {
|
|||||||
|
|
||||||
// Add Kapt to the project to test its input checks as well:
|
// Add Kapt to the project to test its input checks as well:
|
||||||
apply plugin: 'kotlin-kapt'
|
apply plugin: 'kotlin-kapt'
|
||||||
compileKotlin.getDefaultCompilerClasspath${'$'}kotlin_gradle_plugin().setFrom(files($originalPaths).toList())
|
compileKotlin.getDefaultCompilerClasspath${'$'}$pluginSuffix().setFrom(files($originalPaths).toList())
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
kaptGenerateStubsKotlin.getDefaultCompilerClasspath${'$'}kotlin_gradle_plugin().setFrom(files($originalPaths).toList())
|
kaptGenerateStubsKotlin.getDefaultCompilerClasspath${'$'}$pluginSuffix().setFrom(files($originalPaths).toList())
|
||||||
}
|
}
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-12
@@ -1,7 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "kotlin2js"
|
|
||||||
id "maven-publish"
|
id "maven-publish"
|
||||||
id "org.jetbrains.kotlin.plugin.serialization"
|
id "org.jetbrains.kotlin.plugin.serialization"
|
||||||
|
id "org.jetbrains.kotlin.js"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "com.example"
|
group = "com.example"
|
||||||
@@ -28,14 +28,3 @@ if (project.findProperty("mppProjectDependency") == "true") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
main(MavenPublication) {
|
|
||||||
from components.java
|
|
||||||
}
|
|
||||||
}
|
|
||||||
repositories {
|
|
||||||
maven { setUrl("${rootProject.buildDir}/repo") }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
+11
-2
@@ -1,7 +1,16 @@
|
|||||||
plugins {
|
buildscript {
|
||||||
id "kotlin2js"
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply plugin: "kotlin2js"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
Reference in New Issue
Block a user