Add module-info to kotlin-test-* framework adapter artifacts
#KT-21266
This commit is contained in:
@@ -5,6 +5,14 @@ apply plugin: 'kotlin-platform-jvm'
|
|||||||
configureJvm6Project(project)
|
configureJvm6Project(project)
|
||||||
configurePublishing(project)
|
configurePublishing(project)
|
||||||
|
|
||||||
|
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
if (includeJava9) {
|
||||||
|
java9
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
|
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
|
||||||
compile project(':kotlin-test:kotlin-test-jvm')
|
compile project(':kotlin-test:kotlin-test-jvm')
|
||||||
@@ -13,7 +21,10 @@ dependencies {
|
|||||||
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifestAttributes(manifest, project, 'Test')
|
manifestAttributes(manifest, project, 'Test', true)
|
||||||
|
if (includeJava9) {
|
||||||
|
from sourceSets.java9.output
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
@@ -30,3 +41,7 @@ compileKotlin {
|
|||||||
compileTestKotlin {
|
compileTestKotlin {
|
||||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (includeJava9) {
|
||||||
|
compileJava9Sources(project, 'kotlin.test.junit')
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
module kotlin.test.junit {
|
||||||
|
requires transitive kotlin.stdlib;
|
||||||
|
requires transitive kotlin.test;
|
||||||
|
|
||||||
|
requires junit;
|
||||||
|
|
||||||
|
exports kotlin.test.junit;
|
||||||
|
|
||||||
|
provides kotlin.test.AsserterContributor with kotlin.test.junit.JUnitContributor;
|
||||||
|
}
|
||||||
@@ -7,6 +7,14 @@ configurePublishing(project)
|
|||||||
ext.javaHome = JDK_18
|
ext.javaHome = JDK_18
|
||||||
ext.jvmTarget = "1.8"
|
ext.jvmTarget = "1.8"
|
||||||
|
|
||||||
|
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
if (includeJava9) {
|
||||||
|
java9
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
project.ext["jpsLibraryPath"] = rootProject.distLibDir
|
project.ext["jpsLibraryPath"] = rootProject.distLibDir
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -18,7 +26,10 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifestAttributes(manifest, project, 'Test')
|
manifestAttributes(manifest, project, 'Test', true)
|
||||||
|
if (includeJava9) {
|
||||||
|
from sourceSets.java9.output
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
@@ -41,6 +52,10 @@ compileTestKotlin {
|
|||||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (includeJava9) {
|
||||||
|
compileJava9Sources(project, 'kotlin.test.junit5')
|
||||||
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
executable = "$JDK_18/bin/java"
|
executable = "$JDK_18/bin/java"
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
@SuppressWarnings("module") // suppress warning about terminal digit
|
||||||
|
module kotlin.test.junit5 {
|
||||||
|
requires transitive kotlin.stdlib;
|
||||||
|
requires transitive kotlin.test;
|
||||||
|
|
||||||
|
requires org.junit.jupiter.api;
|
||||||
|
|
||||||
|
exports kotlin.test.junit5;
|
||||||
|
|
||||||
|
provides kotlin.test.AsserterContributor with kotlin.test.junit5.JUnit5Contributor;
|
||||||
|
}
|
||||||
@@ -6,14 +6,28 @@ configureJvm6Project(project)
|
|||||||
configurePublishing(project)
|
configurePublishing(project)
|
||||||
ext.javaHome = JDK_17
|
ext.javaHome = JDK_17
|
||||||
|
|
||||||
|
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
if (includeJava9) {
|
||||||
|
java9
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
|
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
|
||||||
compile project(':kotlin-test:kotlin-test-jvm')
|
compile project(':kotlin-test:kotlin-test-jvm')
|
||||||
compile('org.testng:testng:6.13.1')
|
compile('org.testng:testng:6.13.1')
|
||||||
|
if (includeJava9) {
|
||||||
|
java9CompileOnly('org.testng:testng:7.0.0')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifestAttributes(manifest, project, 'Test')
|
manifestAttributes(manifest, project, 'Test', true)
|
||||||
|
if (includeJava9) {
|
||||||
|
from sourceSets.java9.output
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
@@ -31,6 +45,10 @@ compileTestKotlin {
|
|||||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (includeJava9) {
|
||||||
|
compileJava9Sources(project, 'kotlin.test.testng')
|
||||||
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
useTestNG()
|
useTestNG()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
module kotlin.test.testng {
|
||||||
|
requires transitive kotlin.stdlib;
|
||||||
|
requires transitive kotlin.test;
|
||||||
|
|
||||||
|
requires org.testng; // automatic module name in testng manifest since 7.0.0
|
||||||
|
// won't work with earlier versions, where just 'testng' name was inferred from the artifact name
|
||||||
|
|
||||||
|
exports kotlin.test.testng;
|
||||||
|
|
||||||
|
provides kotlin.test.AsserterContributor with kotlin.test.testng.TestNGContributor;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user