Setup dist task to assemble libs for compiler distribution.

Produce special stdlib artifact with annotations for dist.
Put js outputs to dist, they're required for JS backend tests.

Use kotlin-compiler for maven, which has all required dependencies bundled.
Clean local directory repository on clean.

Change paths in tests to compiled artifacts.
This commit is contained in:
Ilya Gorbunov
2017-03-29 08:38:49 +03:00
parent 0b2cadc638
commit 3db1613167
15 changed files with 105 additions and 6 deletions
+37
View File
@@ -6,6 +6,17 @@ configureJvmProject(project)
configurePublishing(project)
sourceSets {
annotations {
if(!System.properties.'idea.active') {
java {
srcDir "${rootDir}/../core/runtime.jvm/src"
include 'org/jetbrains/annotations/**'
}
kotlin {
exclude '**/*'
}
}
}
builtins {
java {
srcDir "${rootDir}/../core/builtins/src"
@@ -49,6 +60,16 @@ jar {
from sourceSets.builtins.output
}
task distJar(type: Jar) {
baseName = 'dist-kotlin-stdlib'
version = null
manifestAttributes(manifest, project, 'Main')
from("${rootDir}/../dist/builtins")
from sourceSets.annotations.output
from sourceSets.builtins.output
from sourceSets.main.output
}
sourcesJar {
from "${rootDir}/../core/builtins/native"
from sourceSets.builtins.kotlin
@@ -59,6 +80,22 @@ artifacts {
archives javadocJar
}
dist {
[distJar, sourcesJar].forEach {
from(it) {
rename('dist-', '')
}
// legacy
from(it) {
rename('dist-', '')
rename('kotlin-stdlib', 'kotlin-runtime')
}
}
from (configurations.compile) {
include 'annotations*.jar'
}
}
compileBuiltinsKotlin {
kotlinOptions {
freeCompilerArgs = [
+4
View File
@@ -35,6 +35,10 @@ artifacts {
archives javadocJar
}
dist {
from (jar, sourcesJar)
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions.jdkHome = JDK_17
+4
View File
@@ -37,6 +37,10 @@ artifacts {
archives javadocJar
}
dist {
from (jar, sourcesJar)
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions.jdkHome = JDK_18
kotlinOptions.jvmTarget = 1.8
+14
View File
@@ -228,6 +228,20 @@ artifacts {
}
dist {
[mergedJar, sourcesJar].forEach {
from(it)
// legacy
from(it) {
rename("kotlin-stdlib-js", 'kotlin-jslib')
}
}
from(compileJs) {
into '../../js'
}
}
karma {
dependencies(['qunitjs@1.23.1', 'karma-teamcity-reporter@0.1.2'])