Add separate test project for warn on different classloaders test
After this update to have different classpath hash in subprojects, they should have different sets of plugins applied. But KGP could be in all of them. ^KT-49227 In Progress
This commit is contained in:
+1
-1
@@ -998,7 +998,7 @@ class KotlinGradleIT : BaseGradleIT() {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDetectingDifferentClassLoaders() = with(Project("kt-27059-pom-rewriting", GradleVersionRequired.FOR_MPP_SUPPORT)) {
|
||||
fun testDetectingDifferentClassLoaders() = with(Project("differentClassloaders", GradleVersionRequired.FOR_MPP_SUPPORT)) {
|
||||
setupWorkingDir()
|
||||
|
||||
val originalRootBuildScript = gradleBuildScript().readText()
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.multiplatform" version "<pluginMarkerVersion>" apply false
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
kotlin.js.compiler=legacy
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
plugins {
|
||||
id "kotlin2js"
|
||||
id "maven-publish"
|
||||
id "org.jetbrains.kotlin.plugin.serialization"
|
||||
}
|
||||
|
||||
group = "com.example"
|
||||
version = "1.0"
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-js"
|
||||
}
|
||||
|
||||
if (project.findProperty("mppProjectDependency") == "true") {
|
||||
|
||||
dependencies {
|
||||
api project(":mpp-lib")
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
repositories {
|
||||
maven { setUrl "${rootProject.buildDir}/repo" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api "com.example:mpp-lib:1.0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
main(MavenPublication) {
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven { setUrl("${rootProject.buildDir}/repo") }
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import com.example.mpp.lib.*
|
||||
|
||||
fun main() {
|
||||
println(hello())
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
id "maven-publish"
|
||||
id "org.jetbrains.kotlin.plugin.allopen"
|
||||
}
|
||||
|
||||
group = "com.example"
|
||||
version = "1.0"
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
}
|
||||
|
||||
if (project.findProperty("mppProjectDependency") == "true") {
|
||||
|
||||
dependencies {
|
||||
api project(":mpp-lib")
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
repositories {
|
||||
maven { setUrl "${rootProject.buildDir}/repo" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api "com.example:mpp-lib:1.0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
main(MavenPublication) {
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven { setUrl("${rootProject.buildDir}/repo") }
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import com.example.mpp.lib.*
|
||||
|
||||
fun main() {
|
||||
println(hello())
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.multiplatform"
|
||||
id "maven-publish"
|
||||
}
|
||||
|
||||
group = "com.example"
|
||||
version = "1.0"
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js()
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
|
||||
}
|
||||
}
|
||||
jvmMain {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
|
||||
}
|
||||
}
|
||||
jsMain {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
jvm {
|
||||
artifactId = "mpp-lib-myjvm"
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { setUrl("${rootProject.buildDir}/repo") }
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package com.example.mpp.lib
|
||||
|
||||
fun hello(): String = "hello"
|
||||
+1
@@ -0,0 +1 @@
|
||||
include(":mpp-lib", ":jvm-app", ":js-app")
|
||||
Reference in New Issue
Block a user