[Commonizer] Implement :native:kotlin-klib-commonizer:api with support for library commonization
- Implement new Gradle module ':native:kotlin-klib-commonizer' - Implement new NativeKlibCommonize task - Implement CommonizerTarget.identityString
This commit is contained in:
committed by
Space
parent
6d019d9544
commit
4500b6ce74
@@ -0,0 +1,44 @@
|
||||
import org.jetbrains.kotlin.gradle.utils.NativeCompilerDownloader
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
explicitApi()
|
||||
}
|
||||
|
||||
description = "Kotlin KLIB Library Commonizer API"
|
||||
publish()
|
||||
|
||||
dependencies {
|
||||
implementation(kotlinStdlib())
|
||||
implementation(project(":native:kotlin-native-utils"))
|
||||
testImplementation(project(":kotlin-test::kotlin-test-junit"))
|
||||
testImplementation(commonDep("junit:junit"))
|
||||
testImplementation(projectTests(":compiler:tests-common"))
|
||||
testRuntimeOnly(project(":native:kotlin-klib-commonizer"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
tasks.register("downloadNativeCompiler") {
|
||||
doFirst {
|
||||
NativeCompilerDownloader(project).downloadIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
projectTest(parallel = false) {
|
||||
dependsOn(":dist")
|
||||
dependsOn("downloadNativeCompiler")
|
||||
workingDir = projectDir
|
||||
environment("KONAN_HOME", NativeCompilerDownloader(project).compilerDirectory.absolutePath)
|
||||
}
|
||||
|
||||
runtimeJar()
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
Reference in New Issue
Block a user