[ObjCExport] Split ObjCExport into K1 and Analysis Api implementation

FL-23390
^KT-64168 Fixed
This commit is contained in:
Sebastian Sellmair
2023-12-06 18:14:00 +01:00
committed by Space Team
parent 3e57265fcb
commit e409c60780
95 changed files with 1042 additions and 383 deletions
@@ -1,23 +1,23 @@
@file:Suppress("HasPlatformType")
plugins {
kotlin("jvm")
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
dependencies {
implementation(intellijCore())
implementation(project(":compiler:cli-base"))
implementation(project(":compiler:cli-common"))
implementation(project(":compiler:ir.objcinterop"))
implementation(project(":compiler:ir.serialization.native"))
implementation(project(":core:compiler.common.native"))
implementation(project(":core:descriptors"))
implementation(project(":native:base"))
implementation(project(":native:kotlin-native-utils"))
api(intellijCore())
api(project(":native:base"))
api(project(":core:compiler.common"))
testImplementation(libs.junit.jupiter.api)
testImplementation(libs.junit.jupiter.params)
testImplementation(project(":compiler:tests-common", "tests-jar"))
testRuntimeOnly(libs.junit.jupiter.engine)
testApi(libs.junit.jupiter.api)
testApi(libs.junit.jupiter.engine)
testApi(libs.junit.jupiter.params)
testApi(project(":compiler:tests-common", "tests-jar"))
}
kotlin {
@@ -26,8 +26,40 @@ kotlin {
}
}
nativeTest("test", tag = null) {
useJUnitPlatform()
systemProperty("projectDir", projectDir.absolutePath)
workingDir(rootProject.projectDir)
/* Configure tests */
testsJar()
val k1TestRuntimeClasspath by configurations.creating
val analysisApiRuntimeClasspath by configurations.creating
dependencies {
k1TestRuntimeClasspath(project(":native:objcexport-header-generator-k1"))
k1TestRuntimeClasspath(projectTests(":native:objcexport-header-generator-k1"))
analysisApiRuntimeClasspath(project(":native:objcexport-header-generator-analysis-api"))
analysisApiRuntimeClasspath(projectTests(":native:objcexport-header-generator-analysis-api"))
}
tasks.test.configure {
enabled = false
}
nativeTest("testK1", tag = null) {
useJUnitPlatform()
enableJunit5ExtensionsAutodetection()
classpath += k1TestRuntimeClasspath
}
nativeTest("testAnalysisApi", tag = null) {
useJUnitPlatform()
enableJunit5ExtensionsAutodetection()
testClassesDirs += files(sourceSets.test.map { it.output.classesDirs })
classpath += analysisApiRuntimeClasspath
}
tasks.check.configure {
dependsOn("testK1")
dependsOn(":native:objcexport-header-generator-k1:check")
dependsOn(":native:objcexport-header-generator-analysis-api:check")
}