[K/N][build] Composite build with build.tools-conventions plugin
Adds convention plugin instead of sources inclusion inside the buildSrc, effectively reducing the amount of the code to be compiled in buildSrc. Merge-request: KT-MR-8898
This commit is contained in:
committed by
Space Team
parent
45637c1b94
commit
395e3e0f81
@@ -13,7 +13,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: org.jetbrains.kotlin.NativeInteropPlugin
|
||||
apply plugin: "native-interop-plugin"
|
||||
apply plugin: "maven-publish"
|
||||
apply plugin: CppConsumerPlugin
|
||||
|
||||
|
||||
@@ -21,17 +21,11 @@ buildscript {
|
||||
url project.bootstrapKotlinRepo
|
||||
}
|
||||
}
|
||||
ext.useCustomDist = UtilsKt.getUseCustomDist(project)
|
||||
ext.kotlinNativeDist = UtilsKt.getKotlinNativeDist(project)
|
||||
if (!useCustomDist) {
|
||||
ext.setProperty("kotlin.native.home", kotlinNativeDist.absolutePath)
|
||||
ext.setProperty("org.jetbrains.kotlin.native.home", kotlinNativeDist.absolutePath)
|
||||
ext.setProperty("konan.home", kotlinNativeDist.absolutePath)
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'konan'
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'kotlin.native.build-tools-conventions'
|
||||
|
||||
configurations {
|
||||
cli_bc
|
||||
@@ -56,6 +50,13 @@ ext.testLibraryDir = "${ext.testOutputRoot}/klib/platform/${project.target.name}
|
||||
// NOTE: If this persists in a gradle daemon, environment update (e.g. an Xcode update) may lead to execution failures.
|
||||
project.extensions.executor = ExecutorServiceKt.create(project)
|
||||
|
||||
ext.useCustomDist = UtilsKt.getUseCustomDist(project)
|
||||
ext.kotlinNativeDist = UtilsKt.getKotlinNativeDist(project)
|
||||
if (!useCustomDist) {
|
||||
ext.setProperty("kotlin.native.home", kotlinNativeDist.absolutePath)
|
||||
ext.setProperty("org.jetbrains.kotlin.native.home", kotlinNativeDist.absolutePath)
|
||||
ext.setProperty("konan.home", kotlinNativeDist.absolutePath)
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions {
|
||||
|
||||
Reference in New Issue
Block a user