[build][native] don't ever fix dist, take it with API
This commit is contained in:
@@ -59,7 +59,7 @@ targetList.each { target ->
|
||||
def cacheTask = task("${target}Cache")
|
||||
|
||||
endorsedLibrariesList.each { library ->
|
||||
def dist = rootProject.file("dist")
|
||||
def dist = UtilsKt.getKotlinNativeDist(project)
|
||||
task("${target}${library.taskName}Cache", type: KonanCacheTask) {
|
||||
it.target = target
|
||||
originalKlib = file("${project.buildDir}/${library.name}")
|
||||
@@ -78,7 +78,7 @@ targetList.each { target ->
|
||||
|
||||
endorsedLibrariesList.each { library ->
|
||||
task("${library.taskName}CommonSources", type: Zip) {
|
||||
destinationDirectory = file("${rootProject.projectDir}/dist/sources")
|
||||
destinationDirectory = file("${UtilsKt.getKotlinNativeDist(project)}/dist/sources")
|
||||
archiveFileName = "${library.name}-common-sources.zip"
|
||||
|
||||
includeEmptyDirs = false
|
||||
@@ -87,7 +87,7 @@ endorsedLibrariesList.each { library ->
|
||||
from(library.project.file('src/main/kotlin'))
|
||||
}
|
||||
task("${library.taskName}NativeSources", type: Zip) {
|
||||
destinationDirectory = file("${rootProject.projectDir}/dist/sources")
|
||||
destinationDirectory = file("${UtilsKt.getKotlinNativeDist(project)}/dist/sources")
|
||||
archiveFileName = "${library.name}-native-sources.zip"
|
||||
|
||||
includeEmptyDirs = false
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import org.jetbrains.kotlin.konan.target.HostManager
|
||||
import org.jetbrains.kotlin.konan.util.PlatformLibsInfo
|
||||
import org.jetbrains.kotlin.*
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
@@ -82,9 +83,11 @@ targetList.each { target ->
|
||||
dependsOn ":kotlin-native:distCompiler"
|
||||
dependsOn ":kotlin-native:${target}CrossDistRuntime"
|
||||
|
||||
def kotlinNativeDist = UtilsKt.getKotlinNativeDist(project)
|
||||
systemProperties "konan.home": kotlinNativeDist
|
||||
main = 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
|
||||
// This task depends on distCompiler, so the compiler jar is already in the dist directory.
|
||||
classpath = fileTree("${rootProject.projectDir}/dist/konan/lib") {
|
||||
classpath = fileTree("$kotlinNativeDist/konan/lib") {
|
||||
include "*.jar"
|
||||
}
|
||||
jvmArgs = konanJvmArgs
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
org.jetbrains.kotlin.native.home=../../dist
|
||||
org.jetbrains.kotlin.native.jvmArgs=-Xmx6G
|
||||
Reference in New Issue
Block a user