Fix clean task after dependencies path change
This commit is contained in:
@@ -168,7 +168,7 @@ task start(dependsOn: "${hostName}Start")
|
|||||||
|
|
||||||
targetList.each { target ->
|
targetList.each { target ->
|
||||||
def konanJvmArgs = ["-ea",
|
def konanJvmArgs = ["-ea",
|
||||||
"-Dkonan.home=${project.parent.file('dist')}",
|
"-Dkonan.home=$distDir",
|
||||||
"-Djava.library.path=${project.buildDir}/nativelibs",
|
"-Djava.library.path=${project.buildDir}/nativelibs",
|
||||||
"-Dfile.encoding=UTF-8"]
|
"-Dfile.encoding=UTF-8"]
|
||||||
|
|
||||||
|
|||||||
+7
-8
@@ -26,6 +26,7 @@ ext {
|
|||||||
konanPropertiesFile = project(':backend.native').file('konan.properties')
|
konanPropertiesFile = project(':backend.native').file('konan.properties')
|
||||||
konanProperties = PropertiesKt.loadProperties(konanPropertiesFile.absolutePath)
|
konanProperties = PropertiesKt.loadProperties(konanPropertiesFile.absolutePath)
|
||||||
|
|
||||||
|
distDir = file('dist')
|
||||||
dependenciesDir = DependencyProcessor.defaultDependenciesRoot
|
dependenciesDir = DependencyProcessor.defaultDependenciesRoot
|
||||||
clangManager = new ClangManager(konanProperties, dependenciesDir.absolutePath)
|
clangManager = new ClangManager(konanProperties, dependenciesDir.absolutePath)
|
||||||
kotlinCompilerModule="org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}"
|
kotlinCompilerModule="org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}"
|
||||||
@@ -152,7 +153,7 @@ task distCompiler(type: Copy) {
|
|||||||
dependsOn ':klib:jar'
|
dependsOn ':klib:jar'
|
||||||
dependsOn ':shared:jar'
|
dependsOn ':shared:jar'
|
||||||
|
|
||||||
destinationDir file('dist')
|
destinationDir distDir
|
||||||
|
|
||||||
from(project(':backend.native').file('build/libs')) {
|
from(project(':backend.native').file('build/libs')) {
|
||||||
into('konan/lib')
|
into('konan/lib')
|
||||||
@@ -223,7 +224,7 @@ task distCompiler(type: Copy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
task listDist(type: Exec) {
|
task listDist(type: Exec) {
|
||||||
commandLine 'find', 'dist'
|
commandLine 'find', distDir
|
||||||
}
|
}
|
||||||
|
|
||||||
task distRuntime(type: Copy) {
|
task distRuntime(type: Copy) {
|
||||||
@@ -234,7 +235,7 @@ task distRuntime(type: Copy) {
|
|||||||
def stdlib = 'klib/common/stdlib'
|
def stdlib = 'klib/common/stdlib'
|
||||||
|
|
||||||
task commonDistRuntime(type: Copy) {
|
task commonDistRuntime(type: Copy) {
|
||||||
destinationDir file('dist')
|
destinationDir distDir
|
||||||
|
|
||||||
// Target independant common part.
|
// Target independant common part.
|
||||||
from(project(':runtime').file("build/${hostName}Stdlib")) {
|
from(project(':runtime').file("build/${hostName}Stdlib")) {
|
||||||
@@ -258,7 +259,7 @@ targetList.each { target ->
|
|||||||
dependsOn ":backend.native:${target}Stdlib"
|
dependsOn ":backend.native:${target}Stdlib"
|
||||||
dependsOn ":backend.native:${target}Start"
|
dependsOn ":backend.native:${target}Start"
|
||||||
|
|
||||||
destinationDir file('dist')
|
destinationDir distDir
|
||||||
|
|
||||||
from(project(':runtime').file("build/$target")) {
|
from(project(':runtime').file("build/$target")) {
|
||||||
include("*.bc")
|
include("*.bc")
|
||||||
@@ -298,7 +299,7 @@ targetList.each { target ->
|
|||||||
'kotlin_version' : kotlin_version,
|
'kotlin_version' : kotlin_version,
|
||||||
'name' : defFile.name,
|
'name' : defFile.name,
|
||||||
'defFile' : defFile.file.absolutePath,
|
'defFile' : defFile.file.absolutePath,
|
||||||
'konan.home' : project.file('dist'),
|
'konan.home' : distDir,
|
||||||
'target' : target,
|
'target' : target,
|
||||||
'suffix' : suffix,
|
'suffix' : suffix,
|
||||||
'libraries' : defFile.config.depends.join(" ")
|
'libraries' : defFile.config.depends.join(" ")
|
||||||
@@ -399,9 +400,7 @@ task performance(type: GradleBuild) {
|
|||||||
|
|
||||||
task clean {
|
task clean {
|
||||||
doLast {
|
doLast {
|
||||||
file('dist').traverse(type: FileType.ANY, excludeNameFilter: "dependencies", maxDepth: 0) {
|
delete distDir
|
||||||
delete it
|
|
||||||
}
|
|
||||||
delete bundle.outputs.files
|
delete bundle.outputs.files
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ dependencies {
|
|||||||
compile project(path: ':backend.native', configuration: 'cli_bc')
|
compile project(path: ':backend.native', configuration: 'cli_bc')
|
||||||
}
|
}
|
||||||
|
|
||||||
def dist = rootProject.file('dist').absolutePath
|
def dist = distDir.absolutePath
|
||||||
def suffix = isWindows() ? ".bat" : ""
|
def suffix = isWindows() ? ".bat" : ""
|
||||||
|
|
||||||
// TODO: Ideally we want to write just konanArtifacts{} clause here,
|
// TODO: Ideally we want to write just konanArtifacts{} clause here,
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ dependencies {
|
|||||||
test {
|
test {
|
||||||
dependsOn ':dist'
|
dependsOn ':dist'
|
||||||
//testLogging.showStandardStreams = true
|
//testLogging.showStandardStreams = true
|
||||||
systemProperty("konan.home", rootProject.file('dist').canonicalPath)
|
systemProperty("konan.home", distDir.absolutePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
|
|||||||
Reference in New Issue
Block a user