Download common stdlib sources as a dependency

This commit is contained in:
Ilya Matveev
2018-06-01 14:09:38 +07:00
committed by Pavel Punegov
parent eed9f31dac
commit 0e2fa56269
2 changed files with 11 additions and 4 deletions
+10 -4
View File
@@ -117,6 +117,7 @@ configurations {
kotlin_stdlib_jar kotlin_stdlib_jar
kotlin_reflect_jar kotlin_reflect_jar
kotlin_script_runtime_jar kotlin_script_runtime_jar
kotlin_common_stdlib_src
cli_bcRuntime { cli_bcRuntime {
extendsFrom compilerRuntime extendsFrom compilerRuntime
@@ -133,6 +134,7 @@ dependencies {
kotlin_stdlib_jar "$kotlinStdLibModule@jar" kotlin_stdlib_jar "$kotlinStdLibModule@jar"
kotlin_reflect_jar "$kotlinReflectModule@jar" kotlin_reflect_jar "$kotlinReflectModule@jar"
kotlin_script_runtime_jar "$kotlinScriptRuntimeModule@jar" kotlin_script_runtime_jar "$kotlinScriptRuntimeModule@jar"
kotlin_common_stdlib_src kotlinCommonStdlibModule
compilerCompile "com.google.protobuf:protobuf-java:${protobufVersion}" compilerCompile "com.google.protobuf:protobuf-java:${protobufVersion}"
@@ -158,6 +160,11 @@ classes.dependsOn 'compilerClasses','cli_bcClasses','bc_frontendClasses'
task stdlib(dependsOn: "${hostName}Stdlib") task stdlib(dependsOn: "${hostName}Stdlib")
task start(dependsOn: "${hostName}Start") task start(dependsOn: "${hostName}Start")
def commonSrc = zipTree(configurations.kotlin_common_stdlib_src.singleFile).matching {
include 'generated/**/*.kt'
include 'kotlin/**/*.kt'
}
// 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
@@ -183,8 +190,8 @@ targetList.each { target ->
'-output', project(':runtime').file("build/${target}Stdlib"), '-output', project(':runtime').file("build/${target}Stdlib"),
'-produce', 'library', '-module_name', 'stdlib', '-produce', 'library', '-module_name', 'stdlib',
'-Xmulti-platform', '-Xuse-experimental=kotlin.Experimental', '-Xmulti-platform', '-Xuse-experimental=kotlin.Experimental',
rootProject.file('libraries/generated'), '--disable', 'devirtualization',
rootProject.file('libraries'), *commonSrc.files.toList(),
project(':Interop:Runtime').file('src/main/kotlin'), project(':Interop:Runtime').file('src/main/kotlin'),
project(':Interop:Runtime').file('src/native/kotlin'), project(':Interop:Runtime').file('src/native/kotlin'),
project(':Interop:JsRuntime').file('src/main/kotlin'), project(':Interop:JsRuntime').file('src/main/kotlin'),
@@ -193,8 +200,7 @@ targetList.each { target ->
inputs.dir(project(':Interop: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:Runtime').file('src/native/kotlin'))
inputs.dir(project(':Interop:JsRuntime').file('src/main/kotlin')) inputs.dir(project(':Interop:JsRuntime').file('src/main/kotlin'))
inputs.dir(rootProject.file('libraries/generated')) inputs.files(commonSrc)
inputs.dir(rootProject.file('libraries/kotlin'))
outputs.dir(project(':runtime').file("build/${target}Stdlib")) outputs.dir(project(':runtime').file("build/${target}Stdlib"))
dependsOn ":runtime:${target}Runtime" dependsOn ":runtime:${target}Runtime"
+1
View File
@@ -42,6 +42,7 @@ ext {
dependenciesDir = DependencyProcessor.defaultDependenciesRoot dependenciesDir = DependencyProcessor.defaultDependenciesRoot
platformManager = new PlatformManager(DistributionKt.buildDistribution(projectDir.absolutePath)) platformManager = new PlatformManager(DistributionKt.buildDistribution(projectDir.absolutePath))
kotlinCommonStdlibModule="org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion}:sources"
kotlinCompilerModule="org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}" kotlinCompilerModule="org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}"
kotlinStdLibModule="org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}" kotlinStdLibModule="org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
kotlinReflectModule="org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}" kotlinReflectModule="org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}"