Do not duplicate sources, add non-compiled sources to runtime, dump declarations to json.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = "1.1-SNAPSHOT"
|
ext.kotlin_version = "1.1-SNAPSHOT"
|
||||||
|
ext.kotlin_language_version = "1.1"
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url 'http://dl.bintray.com/kotlin/kotlin-eap-1.1' }
|
maven { url 'http://dl.bintray.com/kotlin/kotlin-eap-1.1' }
|
||||||
@@ -32,7 +33,6 @@ subprojects {
|
|||||||
'Implementation-Title': "${project.description ?: project.name}", // TODO: project.description is resolved after evaluating this, therefore this attribute is repeated in the projects; seek for a solution
|
'Implementation-Title': "${project.description ?: project.name}", // TODO: project.description is resolved after evaluating this, therefore this attribute is repeated in the projects; seek for a solution
|
||||||
'Implementation-Version': version,
|
'Implementation-Version': version,
|
||||||
'Build-Jdk': System.getProperty('java.version'),
|
'Build-Jdk': System.getProperty('java.version'),
|
||||||
// 'Kotlin-Version': kotlin.language.version, // TODO: if we need it - find the way to extract it
|
|
||||||
'Built-By': 'JetBrains'
|
'Built-By': 'JetBrains'
|
||||||
}
|
}
|
||||||
from("${rootDir}/../dist/kotlinc/build.txt") { into("META-INF/") }
|
from("${rootDir}/../dist/kotlinc/build.txt") { into("META-INF/") }
|
||||||
@@ -45,7 +45,7 @@ subprojects {
|
|||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn:classes) {
|
task sourcesJar(type: Jar, dependsOn:classes) {
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.kotlin
|
||||||
}
|
}
|
||||||
|
|
||||||
task javadocJar(type: Jar, dependsOn:javadoc) {
|
task javadocJar(type: Jar, dependsOn:javadoc) {
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ sourceSets {
|
|||||||
exclude 'org/jetbrains/annotations/**'
|
exclude 'org/jetbrains/annotations/**'
|
||||||
}
|
}
|
||||||
kotlin {
|
kotlin {
|
||||||
srcDir "${rootDir}/../core/builtins/src"
|
|
||||||
srcDir "${rootDir}/../core/runtime.jvm/src"
|
|
||||||
exclude 'org/jetbrains/annotations/**'
|
exclude 'org/jetbrains/annotations/**'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,11 +21,18 @@ sourceSets {
|
|||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes 'Kotlin-Runtime-Component': 'Core',
|
attributes 'Kotlin-Runtime-Component': 'Core',
|
||||||
|
'Kotlin-Version': "$kotlin_language_version",
|
||||||
'Implementation-Title': "${project.description ?: project.name}"
|
'Implementation-Title': "${project.description ?: project.name}"
|
||||||
}
|
}
|
||||||
from("${rootDir}/../dist/builtins")
|
from("${rootDir}/../dist/builtins")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourcesJar {
|
||||||
|
classifier = 'sources'
|
||||||
|
from sourceSets.main.kotlin
|
||||||
|
from "${rootDir}/../core/builtins/native"
|
||||||
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives sourcesJar
|
archives sourcesJar
|
||||||
archives javadocJar
|
archives javadocJar
|
||||||
@@ -42,5 +47,10 @@ compileJava {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-module-name", "${project.name}".toString()]
|
kotlinOptions.freeCompilerArgs = [
|
||||||
|
"-Xallow-kotlin-package",
|
||||||
|
"-Xdump-declarations-to", "${buildDir}/runtime-declarations.json",
|
||||||
|
"-cp", "${rootDir}/../dist/builtins",
|
||||||
|
"-module-name", project.name
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user