Include new coroutines and unsigned classes into stdlib
Fix clashing module name in common coroutines sourceset
This commit is contained in:
@@ -18,6 +18,7 @@ sourceSets {
|
||||
kotlin {
|
||||
srcDir 'src'
|
||||
srcDir commonSrcDir
|
||||
srcDir '../unsigned/src'
|
||||
}
|
||||
}
|
||||
test {
|
||||
@@ -26,11 +27,6 @@ sourceSets {
|
||||
srcDir 'test'
|
||||
}
|
||||
}
|
||||
unsigned {
|
||||
kotlin {
|
||||
srcDir '../unsigned/src'
|
||||
}
|
||||
}
|
||||
coroutines {
|
||||
kotlin {
|
||||
srcDir '../coroutines/common/src'
|
||||
@@ -43,7 +39,6 @@ dependencies {
|
||||
testCompile project(":kotlin-test:kotlin-test-common")
|
||||
testCompile project(":kotlin-test:kotlin-test-annotations-common")
|
||||
|
||||
unsignedCompile sourceSets.main.output
|
||||
coroutinesCompile sourceSets.main.output
|
||||
}
|
||||
|
||||
@@ -57,17 +52,6 @@ compileKotlinCommon {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs = [
|
||||
"-module-name", project.name,
|
||||
"-Xuse-experimental=kotlin.Experimental",
|
||||
"-Xallow-kotlin-package"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
compileUnsignedKotlinCommon {
|
||||
kotlinOptions {
|
||||
languageVersion = "1.3"
|
||||
apiVersion = "1.3"
|
||||
freeCompilerArgs += [
|
||||
"-Xuse-experimental=kotlin.Experimental",
|
||||
"-Xuse-experimental=kotlin.ExperimentalUnsignedTypes",
|
||||
"-XXLanguage:+InlineClasses",
|
||||
@@ -81,7 +65,7 @@ compileCoroutinesKotlinCommon {
|
||||
languageVersion = "1.3"
|
||||
apiVersion = "1.3"
|
||||
freeCompilerArgs = [
|
||||
"-module-name", project.name,
|
||||
"-module-name", project.name+"-coroutines",
|
||||
"-Xallow-kotlin-package"
|
||||
]
|
||||
}
|
||||
@@ -91,6 +75,7 @@ kotlin.experimental.coroutines 'enable'
|
||||
|
||||
jar {
|
||||
manifestAttributes(manifest, project, 'Main')
|
||||
from sourceSets.coroutines.output
|
||||
}
|
||||
|
||||
task coroutinesCommonJar(type: Jar) {
|
||||
@@ -98,12 +83,12 @@ task coroutinesCommonJar(type: Jar) {
|
||||
version = null
|
||||
manifestAttributes(manifest, project, 'Main')
|
||||
project.configure(manifest) { attributes 'Kotlin-Version': '1.3' }
|
||||
from sourceSets.coroutines.output
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.kotlin
|
||||
from sourceSets.coroutines.kotlin
|
||||
}
|
||||
|
||||
configurations {
|
||||
|
||||
@@ -149,6 +149,7 @@ compileKotlin2Js {
|
||||
freeCompilerArgs += [
|
||||
"-source-map-base-dirs", [builtinsSrcDir, jsSrcDir, commonSrcDir, commonSrcDir2].collect { file(it).absoluteFile }.join(File.pathSeparator),
|
||||
"-Xuse-experimental=kotlin.Experimental",
|
||||
"-XXLanguage:+InlineClasses",
|
||||
"-XXLanguage:-ReleaseCoroutines"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -86,6 +86,8 @@ jar {
|
||||
manifestAttributes(manifest, project, 'Main', true)
|
||||
from("${rootDir}/dist/builtins")
|
||||
from sourceSets.experimental.output
|
||||
from sourceSets.coroutines.output
|
||||
from sourceSets.unsigned.output
|
||||
// TODO: enable as soon as this doesn't cause D8/DX to crash
|
||||
// from sourceSets.java9.output
|
||||
}
|
||||
@@ -98,6 +100,8 @@ task distJar(type: Jar) {
|
||||
from sourceSets.annotations.output
|
||||
from sourceSets.main.output
|
||||
from sourceSets.experimental.output
|
||||
from sourceSets.coroutines.output
|
||||
from sourceSets.unsigned.output
|
||||
// TODO: enable as soon as this doesn't cause D8/DX to crash
|
||||
// from sourceSets.java9.output
|
||||
}
|
||||
@@ -107,7 +111,6 @@ task coroutinesJar(type: Jar) {
|
||||
classifier = 'coroutines'
|
||||
manifestAttributes(manifest, project, 'Main', true)
|
||||
project.configure(manifest) { attributes 'Kotlin-Version': '1.3' }
|
||||
from sourceSets.coroutines.output
|
||||
}
|
||||
|
||||
task unsignedJar(type: Jar) {
|
||||
@@ -115,11 +118,11 @@ task unsignedJar(type: Jar) {
|
||||
classifier = 'unsigned'
|
||||
manifestAttributes(manifest, project, 'Main', true)
|
||||
project.configure(manifest) { attributes 'Kotlin-Version': '1.3' }
|
||||
from sourceSets.unsigned.output
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
from "${rootDir}/core/builtins/native"
|
||||
from sourceSets.coroutines.kotlin
|
||||
}
|
||||
|
||||
task distSourcesJar(type: Jar) {
|
||||
@@ -183,7 +186,8 @@ compileKotlin {
|
||||
"-Xnormalize-constructor-calls=enable",
|
||||
"-module-name", "kotlin-stdlib",
|
||||
"-Xuse-experimental=kotlin.Experimental",
|
||||
"-XXLanguage:-ReleaseCoroutines"
|
||||
"-XXLanguage:-ReleaseCoroutines",
|
||||
"-XXLanguage:+InlineClasses"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user