mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
Export kotlin.test packages with annotations and underlying frameworks
- Add exports for jvm package names used in kotlin.test annotations; - Export transitively underlying test framework modules Otherwise "This class does not have a constructor" happens when using an aliased annotation, e.g. kotlin.test.Test aliased to org.junit.test KT-41320
This commit is contained in:
@@ -53,7 +53,8 @@ ext.compileJava9Sources = { Project project, String moduleName, Collection<FileC
|
||||
|
||||
options.compilerArgs = [
|
||||
'--module-path', modulePath.asPath,
|
||||
'--patch-module', "$moduleName=${moduleFiles.asPath}"
|
||||
'--patch-module', "$moduleName=${moduleFiles.asPath}",
|
||||
'-Xlint:-requires-transitive-automatic' // suppress automatic module transitive dependencies in kotlin.test
|
||||
]
|
||||
|
||||
classpath = files()
|
||||
|
||||
@@ -2,9 +2,10 @@ module kotlin.test.junit {
|
||||
requires transitive kotlin.stdlib;
|
||||
requires transitive kotlin.test;
|
||||
|
||||
requires junit;
|
||||
requires transitive junit;
|
||||
|
||||
exports kotlin.test.junit;
|
||||
exports kotlin.test.junit.annotations;
|
||||
|
||||
provides kotlin.test.AsserterContributor with kotlin.test.junit.JUnitContributor;
|
||||
}
|
||||
|
||||
@@ -3,9 +3,10 @@ module kotlin.test.junit5 {
|
||||
requires transitive kotlin.stdlib;
|
||||
requires transitive kotlin.test;
|
||||
|
||||
requires org.junit.jupiter.api;
|
||||
requires transitive org.junit.jupiter.api;
|
||||
|
||||
exports kotlin.test.junit5;
|
||||
exports kotlin.test.junit5.annotations;
|
||||
|
||||
provides kotlin.test.AsserterContributor with kotlin.test.junit5.JUnit5Contributor;
|
||||
}
|
||||
|
||||
@@ -2,10 +2,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
|
||||
requires transitive 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;
|
||||
exports kotlin.test.testng.annotations;
|
||||
|
||||
provides kotlin.test.AsserterContributor with kotlin.test.testng.TestNGContributor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user