Download common stdlib sources as a dependency
This commit is contained in:
committed by
Pavel Punegov
parent
eed9f31dac
commit
0e2fa56269
@@ -117,6 +117,7 @@ configurations {
|
||||
kotlin_stdlib_jar
|
||||
kotlin_reflect_jar
|
||||
kotlin_script_runtime_jar
|
||||
kotlin_common_stdlib_src
|
||||
|
||||
cli_bcRuntime {
|
||||
extendsFrom compilerRuntime
|
||||
@@ -133,6 +134,7 @@ dependencies {
|
||||
kotlin_stdlib_jar "$kotlinStdLibModule@jar"
|
||||
kotlin_reflect_jar "$kotlinReflectModule@jar"
|
||||
kotlin_script_runtime_jar "$kotlinScriptRuntimeModule@jar"
|
||||
kotlin_common_stdlib_src kotlinCommonStdlibModule
|
||||
|
||||
compilerCompile "com.google.protobuf:protobuf-java:${protobufVersion}"
|
||||
|
||||
@@ -158,6 +160,11 @@ classes.dependsOn 'compilerClasses','cli_bcClasses','bc_frontendClasses'
|
||||
task stdlib(dependsOn: "${hostName}Stdlib")
|
||||
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,
|
||||
// so we provide custom values for
|
||||
// konan.home, --runtime, -Djava.library.path etc
|
||||
@@ -183,8 +190,8 @@ targetList.each { target ->
|
||||
'-output', project(':runtime').file("build/${target}Stdlib"),
|
||||
'-produce', 'library', '-module_name', 'stdlib',
|
||||
'-Xmulti-platform', '-Xuse-experimental=kotlin.Experimental',
|
||||
rootProject.file('libraries/generated'),
|
||||
rootProject.file('libraries'),
|
||||
'--disable', 'devirtualization',
|
||||
*commonSrc.files.toList(),
|
||||
project(':Interop:Runtime').file('src/main/kotlin'),
|
||||
project(':Interop:Runtime').file('src/native/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/native/kotlin'))
|
||||
inputs.dir(project(':Interop:JsRuntime').file('src/main/kotlin'))
|
||||
inputs.dir(rootProject.file('libraries/generated'))
|
||||
inputs.dir(rootProject.file('libraries/kotlin'))
|
||||
inputs.files(commonSrc)
|
||||
outputs.dir(project(':runtime').file("build/${target}Stdlib"))
|
||||
|
||||
dependsOn ":runtime:${target}Runtime"
|
||||
|
||||
@@ -42,6 +42,7 @@ ext {
|
||||
dependenciesDir = DependencyProcessor.defaultDependenciesRoot
|
||||
platformManager = new PlatformManager(DistributionKt.buildDistribution(projectDir.absolutePath))
|
||||
|
||||
kotlinCommonStdlibModule="org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion}:sources"
|
||||
kotlinCompilerModule="org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}"
|
||||
kotlinStdLibModule="org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
|
||||
kotlinReflectModule="org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}"
|
||||
|
||||
Reference in New Issue
Block a user