Split kotlin-stdlib-coroutines into common and java jars

#KT-24532: Fixed
This commit is contained in:
Ilmir Usmanov
2018-05-23 17:47:12 +03:00
parent 9c5256434c
commit 0cb73e55d0
3 changed files with 31 additions and 3 deletions
+30
View File
@@ -31,6 +31,12 @@ sourceSets {
srcDir '../unsigned/src'
}
}
coroutines {
kotlin {
srcDir '../coroutines/common/src'
srcDir '../coroutines/src'
}
}
}
dependencies {
@@ -38,6 +44,7 @@ dependencies {
testCompile project(":kotlin-test:kotlin-test-annotations-common")
unsignedCompile sourceSets.main.output
coroutinesCompile sourceSets.main.output
}
compileKotlinCommon {
@@ -63,6 +70,15 @@ compileUnsignedKotlinCommon {
}
}
compileCoroutinesKotlinCommon {
kotlinOptions {
languageVersion = "1.3"
apiVersion = "1.3"
freeCompilerArgs = [
"-module-name", project.name
]
}
}
kotlin.experimental.coroutines 'enable'
@@ -70,6 +86,13 @@ jar {
manifestAttributes(manifest, project, 'Main')
}
task coroutinesCommonJar(type: Jar) {
classifier = 'coroutines'
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'
@@ -95,4 +118,11 @@ task distCommon(type: Copy) {
dist.dependsOn distCommon
task experimentalCommonJarsDist(type: Copy) {
from coroutinesCommonJar
into distDir
}
dist.dependsOn experimentalCommonJarsDist
classes.setDependsOn(classes.dependsOn.findAll { it != "compileJava" })