add task to zip stdlib sources, extract&reuse code
This commit is contained in:
committed by
Pavel Punegov
parent
62a1ff2e8e
commit
07c02db3f2
@@ -156,6 +156,26 @@ task unzipStdlibSources(type: Copy) {
|
|||||||
destinationDir commonSrc
|
destinationDir commonSrc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final List<File> stdLibSrc = [
|
||||||
|
project(':Interop:Runtime').file('src/main/kotlin'),
|
||||||
|
project(':Interop:Runtime').file('src/native/kotlin'),
|
||||||
|
project(':Interop:JsRuntime').file('src/main/kotlin'),
|
||||||
|
project(':runtime').file('src/main/kotlin')
|
||||||
|
]
|
||||||
|
|
||||||
|
task zipStdLibSources(type: Zip, dependsOn: unzipStdlibSources) {
|
||||||
|
from stdLibSrc, {
|
||||||
|
into "native"
|
||||||
|
}
|
||||||
|
|
||||||
|
from commonSrc, {
|
||||||
|
into "common"
|
||||||
|
}
|
||||||
|
|
||||||
|
archiveName 'kotlin-stdlib-native-sources.zip'
|
||||||
|
destinationDir buildDir
|
||||||
|
}
|
||||||
|
|
||||||
// These files are built before the 'dist' is complete,
|
// These files are built before the 'dist' is complete,
|
||||||
// so we provide custom values for
|
// so we provide custom values for
|
||||||
// konan.home, --runtime, -Djava.library.path etc
|
// konan.home, --runtime, -Djava.library.path etc
|
||||||
@@ -186,14 +206,8 @@ targetList.each { target ->
|
|||||||
'-Xallow-result-return-type',
|
'-Xallow-result-return-type',
|
||||||
commonSrc.absolutePath,
|
commonSrc.absolutePath,
|
||||||
"-Xcommon-sources=${commonSrc.absolutePath}",
|
"-Xcommon-sources=${commonSrc.absolutePath}",
|
||||||
project(':Interop:Runtime').file('src/main/kotlin'),
|
*stdLibSrc]
|
||||||
project(':Interop:Runtime').file('src/native/kotlin'),
|
stdLibSrc.forEach { inputs.dir(it) }
|
||||||
project(':Interop:JsRuntime').file('src/main/kotlin'),
|
|
||||||
project(':runtime').file('src/main/kotlin')]
|
|
||||||
inputs.dir(project(':runtime').file('src/main/kotlin'))
|
|
||||||
inputs.dir(project(':Interop:Runtime').file('src/main/kotlin'))
|
|
||||||
inputs.dir(project(':Interop:Runtime').file('src/native/kotlin'))
|
|
||||||
inputs.dir(project(':Interop:JsRuntime').file('src/main/kotlin'))
|
|
||||||
inputs.dir(commonSrc)
|
inputs.dir(commonSrc)
|
||||||
outputs.dir(project(':runtime').file("build/${target}Stdlib"))
|
outputs.dir(project(':runtime').file("build/${target}Stdlib"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user