Split kotlin-stdlib-coroutines into common and java jars
#KT-24532: Fixed
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ abstract class AbstractMultiPlatformIntegrationTest : KtUsefulTestCase() {
|
|||||||
val commonLibs = Files.newDirectoryStream(Paths.get(stdlibCommonLibsDir)).use(Iterable<Path>::toList)
|
val commonLibs = Files.newDirectoryStream(Paths.get(stdlibCommonLibsDir)).use(Iterable<Path>::toList)
|
||||||
return commonLibs.sorted().findLast {
|
return commonLibs.sorted().findLast {
|
||||||
val name = it.toFile().name
|
val name = it.toFile().name
|
||||||
!name.endsWith("-javadoc.jar") && !name.endsWith("-sources.jar")
|
!name.endsWith("-javadoc.jar") && !name.endsWith("-sources.jar") && !name.contains("coroutines")
|
||||||
}?.toFile() ?: error("kotlin-stdlib-common is not found in $stdlibCommonLibsDir")
|
}?.toFile() ?: error("kotlin-stdlib-common is not found in $stdlibCommonLibsDir")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,12 @@ sourceSets {
|
|||||||
srcDir '../unsigned/src'
|
srcDir '../unsigned/src'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
coroutines {
|
||||||
|
kotlin {
|
||||||
|
srcDir '../coroutines/common/src'
|
||||||
|
srcDir '../coroutines/src'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -38,6 +44,7 @@ dependencies {
|
|||||||
testCompile project(":kotlin-test:kotlin-test-annotations-common")
|
testCompile project(":kotlin-test:kotlin-test-annotations-common")
|
||||||
|
|
||||||
unsignedCompile sourceSets.main.output
|
unsignedCompile sourceSets.main.output
|
||||||
|
coroutinesCompile sourceSets.main.output
|
||||||
}
|
}
|
||||||
|
|
||||||
compileKotlinCommon {
|
compileKotlinCommon {
|
||||||
@@ -63,6 +70,15 @@ compileUnsignedKotlinCommon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compileCoroutinesKotlinCommon {
|
||||||
|
kotlinOptions {
|
||||||
|
languageVersion = "1.3"
|
||||||
|
apiVersion = "1.3"
|
||||||
|
freeCompilerArgs = [
|
||||||
|
"-module-name", project.name
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
kotlin.experimental.coroutines 'enable'
|
kotlin.experimental.coroutines 'enable'
|
||||||
|
|
||||||
@@ -70,6 +86,13 @@ jar {
|
|||||||
manifestAttributes(manifest, project, 'Main')
|
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) {
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
@@ -95,4 +118,11 @@ task distCommon(type: Copy) {
|
|||||||
|
|
||||||
dist.dependsOn distCommon
|
dist.dependsOn distCommon
|
||||||
|
|
||||||
|
task experimentalCommonJarsDist(type: Copy) {
|
||||||
|
from coroutinesCommonJar
|
||||||
|
into distDir
|
||||||
|
}
|
||||||
|
|
||||||
|
dist.dependsOn experimentalCommonJarsDist
|
||||||
|
|
||||||
classes.setDependsOn(classes.dependsOn.findAll { it != "compileJava" })
|
classes.setDependsOn(classes.dependsOn.findAll { it != "compileJava" })
|
||||||
|
|||||||
@@ -40,8 +40,6 @@ sourceSets {
|
|||||||
coroutines {
|
coroutines {
|
||||||
kotlin {
|
kotlin {
|
||||||
srcDir '../coroutines/jvm/src'
|
srcDir '../coroutines/jvm/src'
|
||||||
srcDir '../coroutines/common/src'
|
|
||||||
srcDir '../coroutines/src'
|
|
||||||
}
|
}
|
||||||
compileClasspath += sourceSets.main.output
|
compileClasspath += sourceSets.main.output
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user