[kotlin-test] Drop subprojects unneeded anymore KT-61969
This commit is contained in:
committed by
Space Team
parent
35aa17e1d0
commit
e0bc0b81c6
@@ -1,24 +0,0 @@
|
||||
description = 'Kotlin Test Annotations Common'
|
||||
|
||||
apply plugin: 'kotlin-platform-common'
|
||||
|
||||
JvmToolchain.updateJvmTarget(project, "1.8")
|
||||
|
||||
dependencies {
|
||||
api RepoDependencies.kotlinStdlib(project)
|
||||
testApi project(":kotlin-test:kotlin-test-common")
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) {
|
||||
kotlinOptions.freeCompilerArgs += [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xexpect-actual-classes",
|
||||
]
|
||||
}
|
||||
|
||||
jar {
|
||||
LibrariesCommon.manifestAttributes(project, manifest, 'Test')
|
||||
}
|
||||
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
@@ -1,31 +0,0 @@
|
||||
description = 'Kotlin Test Common'
|
||||
|
||||
apply plugin: 'kotlin-platform-common'
|
||||
|
||||
JvmToolchain.updateJvmTarget(project, "1.8")
|
||||
|
||||
dependencies {
|
||||
api RepoDependencies.kotlinStdlib(project)
|
||||
testApi project(":kotlin-test:kotlin-test-annotations-common")
|
||||
}
|
||||
|
||||
jar {
|
||||
LibrariesCommon.manifestAttributes(project, manifest, 'Test')
|
||||
}
|
||||
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) {
|
||||
kotlinOptions.freeCompilerArgs += ["-Xallow-kotlin-package", "-opt-in=kotlin.RequiresOptIn"]
|
||||
}
|
||||
|
||||
compileKotlinCommon {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += [
|
||||
"-module-name", project.name,
|
||||
"-opt-in=kotlin.contracts.ExperimentalContracts",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
import org.gradle.api.tasks.bundling.Jar
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
description = "Kotlin Test for JS"
|
||||
base.archivesName = "kotlin-test-js"
|
||||
|
||||
val commonMainSources by task<Sync> {
|
||||
from(
|
||||
"$rootDir/libraries/kotlin.test/common/src/main/kotlin",
|
||||
"$rootDir/libraries/kotlin.test/annotations-common/src/main/kotlin"
|
||||
)
|
||||
into(layout.buildDirectory.dir("commonMainSources"))
|
||||
}
|
||||
|
||||
val commonTestSources by task<Sync> {
|
||||
from("$rootDir/libraries/kotlin.test/common/src/test/kotlin")
|
||||
into(layout.buildDirectory.dir("commonTestSources"))
|
||||
}
|
||||
|
||||
val jsMainSources by task<Sync> {
|
||||
from("$rootDir/libraries/kotlin.test/js/src/main/kotlin")
|
||||
into(layout.buildDirectory.dir("jsMainSources"))
|
||||
}
|
||||
|
||||
kotlin {
|
||||
js(IR) {
|
||||
nodejs()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
named("commonMain") {
|
||||
dependencies {
|
||||
api(kotlinStdlib())
|
||||
}
|
||||
kotlin.srcDir(commonMainSources)
|
||||
}
|
||||
named("commonTest") {
|
||||
kotlin.srcDir(commonTestSources)
|
||||
}
|
||||
named("jsMain") {
|
||||
kotlin.srcDir(jsMainSources)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile<*>>().configureEach {
|
||||
kotlinOptions.freeCompilerArgs += listOf(
|
||||
"-Xallow-kotlin-package",
|
||||
"-opt-in=kotlin.ExperimentalMultiplatform",
|
||||
"-opt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xexpect-actual-classes"
|
||||
)
|
||||
}
|
||||
|
||||
tasks.named("compileKotlinJs") {
|
||||
(this as KotlinCompile<*>).kotlinOptions.freeCompilerArgs += "-Xir-module-name=kotlin-test"
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
tasks {
|
||||
val jsJar by existing(Jar::class) {
|
||||
archiveAppendix = null
|
||||
manifestAttributes(manifest, "Test")
|
||||
}
|
||||
val jsSourcesJar by existing(org.gradle.jvm.tasks.Jar::class) {
|
||||
archiveAppendix = null
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
description = 'Kotlin Test JUnit'
|
||||
|
||||
apply plugin: 'kotlin-platform-jvm'
|
||||
|
||||
JvmToolchain.configureJvmToolchain(project, JdkMajorVersion.JDK_1_8)
|
||||
|
||||
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
|
||||
|
||||
sourceSets {
|
||||
if (includeJava9) {
|
||||
java9
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
|
||||
api project(':kotlin-test:kotlin-test-jvm')
|
||||
api('junit:junit:4.13.2')
|
||||
}
|
||||
|
||||
|
||||
jar {
|
||||
LibrariesCommon.manifestAttributes(project, manifest, 'Test', true)
|
||||
if (includeJava9) {
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
}
|
||||
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xexpect-actual-classes",
|
||||
]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
]
|
||||
}
|
||||
|
||||
LibrariesCommon.configureFrontendIr(project)
|
||||
|
||||
if (includeJava9) {
|
||||
LibrariesCommon.configureJava9Compilation(project, 'kotlin.test.junit')
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
description = 'Kotlin Test JUnit 5'
|
||||
|
||||
apply plugin: 'kotlin-platform-jvm'
|
||||
|
||||
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
|
||||
|
||||
sourceSets {
|
||||
if (includeJava9) {
|
||||
java9
|
||||
}
|
||||
}
|
||||
|
||||
project.ext["jpsLibraryPath"] = rootProject.distLibDir
|
||||
|
||||
dependencies {
|
||||
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
|
||||
api project(':kotlin-test:kotlin-test-jvm')
|
||||
|
||||
api("org.junit.jupiter:junit-jupiter-api:5.0.0")
|
||||
testRuntimeOnly(libs.junit.jupiter.engine)
|
||||
}
|
||||
|
||||
jar {
|
||||
LibrariesCommon.manifestAttributes(project, manifest, 'Test', true)
|
||||
if (includeJava9) {
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
}
|
||||
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xexpect-actual-classes",
|
||||
]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
]
|
||||
}
|
||||
|
||||
LibrariesCommon.configureFrontendIr(project)
|
||||
|
||||
if (includeJava9) {
|
||||
LibrariesCommon.configureJava9Compilation(project, 'kotlin.test.junit5')
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
description = 'Kotlin Test'
|
||||
|
||||
apply plugin: 'kotlin-platform-jvm'
|
||||
|
||||
base {
|
||||
archivesName = 'kotlin-test'
|
||||
}
|
||||
|
||||
JvmToolchain.configureJvmToolchain(project, JdkMajorVersion.JDK_1_8)
|
||||
|
||||
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
|
||||
|
||||
sourceSets {
|
||||
if (includeJava9) {
|
||||
java9
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
expectedBy project(':kotlin-test:kotlin-test-common')
|
||||
api(RepoDependencies.kotlinStdlib(project))
|
||||
testApi(project(":kotlin-test:kotlin-test-junit"))
|
||||
testApi('junit:junit:4.13.2')
|
||||
}
|
||||
|
||||
jar {
|
||||
LibrariesCommon.manifestAttributes(project, manifest, 'Test', true)
|
||||
if (includeJava9) {
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
}
|
||||
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
compileKotlin {
|
||||
compilerOptions {
|
||||
freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-opt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-opt-in=kotlin.RequiresOptIn",
|
||||
]
|
||||
moduleName = base.archivesName
|
||||
}
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-opt-in=kotlin.RequiresOptIn",
|
||||
]
|
||||
}
|
||||
|
||||
LibrariesCommon.configureFrontendIr(project)
|
||||
|
||||
if (includeJava9) {
|
||||
LibrariesCommon.configureJava9Compilation(project, 'kotlin.test')
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
description = 'Kotlin Test TestNG'
|
||||
|
||||
apply plugin: 'kotlin-platform-jvm'
|
||||
|
||||
JvmToolchain.configureJvmToolchain(project, JdkMajorVersion.JDK_1_8)
|
||||
|
||||
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
|
||||
|
||||
sourceSets {
|
||||
if (includeJava9) {
|
||||
java9
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
|
||||
api project(':kotlin-test:kotlin-test-jvm')
|
||||
api('org.testng:testng:6.13.1')
|
||||
if (includeJava9) {
|
||||
java9CompileOnly('org.testng:testng:7.0.0')
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
LibrariesCommon.manifestAttributes(project, manifest, 'Test', true)
|
||||
if (includeJava9) {
|
||||
from sourceSets.java9.output
|
||||
}
|
||||
}
|
||||
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xexpect-actual-classes",
|
||||
]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
]
|
||||
}
|
||||
|
||||
LibrariesCommon.configureFrontendIr(project)
|
||||
|
||||
if (includeJava9) {
|
||||
LibrariesCommon.configureJava9Compilation(project, 'kotlin.test.testng')
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import org.jetbrains.kotlin.gradle.targets.js.KotlinWasmTargetAttribute
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
configureWasmKotlinTest(
|
||||
wasmTargetParameter = "wasm-js",
|
||||
wasmTargetAttribute = KotlinWasmTargetAttribute.js,
|
||||
targetSourceDir = "$rootDir/libraries/kotlin.test/wasm/js/src/main/kotlin",
|
||||
stdDependencyName = ":kotlin-stdlib"
|
||||
) { extensionBody ->
|
||||
kotlin(extensionBody)
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import org.jetbrains.kotlin.gradle.targets.js.KotlinWasmTargetAttribute
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
configureWasmKotlinTest(
|
||||
wasmTargetParameter = "wasm-wasi",
|
||||
wasmTargetAttribute = KotlinWasmTargetAttribute.wasi,
|
||||
targetSourceDir = "$rootDir/libraries/kotlin.test/wasm/wasi/src/main/kotlin",
|
||||
stdDependencyName = ":kotlin-stdlib"
|
||||
) { extensionBody ->
|
||||
kotlin(extensionBody)
|
||||
}
|
||||
@@ -23,17 +23,10 @@ sourceSets {
|
||||
}
|
||||
}
|
||||
test {
|
||||
if (!BuildPropertiesKt.getKotlinBuildProperties(project).inIdeaSync)
|
||||
kotlin {
|
||||
srcDir commonTestSrcDir
|
||||
srcDir 'test'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testApi project(":kotlin-test:kotlin-test-common")
|
||||
testApi project(":kotlin-test:kotlin-test-annotations-common")
|
||||
}
|
||||
|
||||
compileKotlinCommon {
|
||||
|
||||
Reference in New Issue
Block a user