Setup separate sourceset for unsigned integer types
Build jar with unsigned types and put it to dist
This commit is contained in:
@@ -26,11 +26,18 @@ sourceSets {
|
||||
srcDir 'test'
|
||||
}
|
||||
}
|
||||
unsigned {
|
||||
kotlin {
|
||||
srcDir '../unsigned/src'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile project(":kotlin-test:kotlin-test-common")
|
||||
testCompile project(":kotlin-test:kotlin-test-annotations-common")
|
||||
|
||||
unsignedCompile sourceSets.main.output
|
||||
}
|
||||
|
||||
compileKotlinCommon {
|
||||
@@ -47,6 +54,14 @@ compileKotlinCommon {
|
||||
}
|
||||
}
|
||||
|
||||
compileUnsignedKotlinCommon {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += [
|
||||
"-XXLanguage:+InlineClasses"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
kotlin.experimental.coroutines 'enable'
|
||||
|
||||
|
||||
@@ -55,6 +55,8 @@ sourceSets {
|
||||
srcDir 'java9'
|
||||
}
|
||||
}
|
||||
unsigned {
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
@@ -69,6 +71,8 @@ dependencies {
|
||||
compile group: 'org.jetbrains', name: 'annotations', version:'13.0'
|
||||
|
||||
testCompile project(':kotlin-test:kotlin-test-junit')
|
||||
|
||||
unsignedCompile sourceSets.main.output
|
||||
}
|
||||
|
||||
jar {
|
||||
@@ -92,13 +96,21 @@ task distJar(type: Jar) {
|
||||
}
|
||||
|
||||
task coroutinesJar(type: Jar) {
|
||||
baseName = 'kotlin-stdlib-coroutines'
|
||||
version = null
|
||||
classifier = 'coroutines'
|
||||
manifestAttributes(manifest, project, 'Main', true)
|
||||
project.configure(manifest) { attributes 'Kotlin-Version': '1.3' }
|
||||
from sourceSets.coroutines.output
|
||||
}
|
||||
|
||||
task unsignedJar(type: Jar) {
|
||||
version = null
|
||||
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"
|
||||
}
|
||||
@@ -139,12 +151,13 @@ dist {
|
||||
}
|
||||
}
|
||||
|
||||
task coroutinesDist(type: Copy) {
|
||||
task experimentalJarsDist(type: Copy) {
|
||||
from coroutinesJar
|
||||
from unsignedJar
|
||||
into distDir
|
||||
}
|
||||
|
||||
dist.dependsOn coroutinesDist
|
||||
dist.dependsOn experimentalJarsDist
|
||||
|
||||
task dexMethodCount(type: DexMethodCount) {
|
||||
from jar
|
||||
@@ -198,4 +211,12 @@ compileCoroutinesKotlin {
|
||||
}
|
||||
}
|
||||
|
||||
compileUnsignedKotlin {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += [
|
||||
"-XXLanguage:+InlineClasses"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines 'enable'
|
||||
|
||||
Reference in New Issue
Block a user