Prepare gradle config for building libs - bootstrap and runtime
Use external gradle plugin (1.1-M04) with compiler.jar from dist Add empty build scripts for other projects that needs to be built with gradle
This commit is contained in:
committed by
Ilya Gorbunov
parent
8e3453f0eb
commit
c2c051cfe8
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
buildscript {
|
||||||
|
ext.kotlin_version = "1.1-SNAPSHOT"
|
||||||
|
repositories {
|
||||||
|
maven { url 'http://dl.bintray.com/kotlin/kotlin-eap-1.1' }
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.1-M04"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
apply plugin: 'maven'
|
||||||
|
|
||||||
|
group = 'org.jetbrains.kotlin'
|
||||||
|
version = "$kotlin_version"
|
||||||
|
}
|
||||||
|
|
||||||
|
subprojects {
|
||||||
|
apply plugin: 'kotlin'
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar, dependsOn:classes) {
|
||||||
|
classifier = 'sources'
|
||||||
|
from sourceSets.main.allSource
|
||||||
|
}
|
||||||
|
|
||||||
|
task javadocJar(type: Jar, dependsOn:javadoc) {
|
||||||
|
classifier = 'javadoc'
|
||||||
|
from javadoc.destinationDir
|
||||||
|
}
|
||||||
|
|
||||||
|
compileKotlin.compilerJarFile = project.file("${rootDir}/../dist/kotlinc/lib/kotlin-compiler.jar")
|
||||||
|
compileTestKotlin.compilerJarFile = project.file("${rootDir}/../dist/kotlinc/lib/kotlin-compiler.jar")
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
description = ''
|
||||||
|
dependencies {
|
||||||
|
compile project(':kotlin-test-parent:kotlin-test')
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
description = ''
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
rootProject.name = 'kotlin-libraries'
|
||||||
|
include ':kotlin-runtime'
|
||||||
|
include ':kotlin-script-runtime'
|
||||||
|
include ':kotlin-stdlib-common'
|
||||||
|
include ':kotlin-stdlib'
|
||||||
|
include ':kotlin-stdlib-jre7'
|
||||||
|
include ':kotlin-stdlib-jre8'
|
||||||
|
include ':kotlin-stdlib-samples'
|
||||||
|
include ':kotlin-reflect'
|
||||||
|
include ':kotlin-js-library'
|
||||||
|
include ':kotlin-test-parent:kotlin-test'
|
||||||
|
include ':kotlin-test-parent:kotlin-test-junit'
|
||||||
|
include ':kotlin-test-parent'
|
||||||
|
|
||||||
|
//include ':kotlin-compiler'
|
||||||
|
//include ':kotlin-compiler-embeddable'
|
||||||
|
//include ':native-platform'
|
||||||
|
//include ':kotlin-compiler-runner'
|
||||||
|
//include ':kotlin-daemon-client'
|
||||||
|
//include ':kotlin-build-common-test'
|
||||||
|
//include ':kotlin-maven-plugin'
|
||||||
|
//include ':kotlin-osgi-bundle'
|
||||||
|
//include ':kotlin-archetypes-parent:kotlin-archetype-jvm'
|
||||||
|
//include ':kotlin-archetypes-parent:kotlin-archetype-js'
|
||||||
|
//include ':kotlin-archetypes-parent'
|
||||||
|
//include ':binary-compatibility-validator'
|
||||||
|
//include ':idl2k'
|
||||||
|
//include ':kotlin-js-tests'
|
||||||
|
//include ':kotlin-js-tests-junit'
|
||||||
|
//include ':kotlin-annotation-processing'
|
||||||
|
//include ':kotlin-allopen'
|
||||||
|
//include ':kotlin-maven-allopen'
|
||||||
|
//include ':kotlin-noarg'
|
||||||
|
//include ':kotlin-maven-noarg'
|
||||||
|
//include ':kotlin-gradle-plugin'
|
||||||
|
//include ':kotlin-gradle-plugin-api'
|
||||||
|
//include ':kotlin-android-extensions'
|
||||||
|
//include ':kotlin-maven-plugin-test'
|
||||||
|
//include ':kotlin-script-util'
|
||||||
|
//include ':annotation-processor-example'
|
||||||
|
//include ':kotlin-java-example'
|
||||||
|
//include ':js-example'
|
||||||
|
//include ':kotlin-js-library-example'
|
||||||
|
//include ':kotlin-gradle-subplugin-example'
|
||||||
|
//include ':browser-example'
|
||||||
|
//include ':browser-example-with-library'
|
||||||
|
//include ':kotlin-jsr223-local-example'
|
||||||
|
//include ':kotlin-jsr223-daemon-local-eval-example'
|
||||||
|
//include ':kotlin-gradle-plugin-integration-tests'
|
||||||
|
|
||||||
|
project(':kotlin-runtime').projectDir = "$rootDir/tools/runtime" as File
|
||||||
|
project(':kotlin-script-runtime').projectDir = "$rootDir/tools/script-runtime" as File
|
||||||
|
project(':kotlin-stdlib-common').projectDir = "$rootDir/stdlib/common" as File
|
||||||
|
project(':kotlin-stdlib').projectDir = "$rootDir/stdlib" as File
|
||||||
|
project(':kotlin-stdlib-jre7').projectDir = "$rootDir/stdlib/jre7" as File
|
||||||
|
project(':kotlin-stdlib-jre8').projectDir = "$rootDir/stdlib/jre8" as File
|
||||||
|
project(':kotlin-stdlib-samples').projectDir = "$rootDir/stdlib/samples" as File
|
||||||
|
project(':kotlin-reflect').projectDir = "$rootDir/tools/kotlin-reflect" as File
|
||||||
|
project(':kotlin-js-library').projectDir = "$rootDir/tools/kotlin-js-library" as File
|
||||||
|
project(':kotlin-test-parent:kotlin-test').projectDir = "$rootDir/kotlin.test/shared" as File
|
||||||
|
project(':kotlin-test-parent:kotlin-test-junit').projectDir = "$rootDir/kotlin.test/junit" as File
|
||||||
|
project(':kotlin-test-parent').projectDir = "$rootDir/kotlin.test" as File
|
||||||
|
|
||||||
|
//project(':kotlin-compiler').projectDir = "$rootDir/tools/kotlin-compiler" as File
|
||||||
|
//project(':kotlin-compiler-embeddable').projectDir = "$rootDir/tools/kotlin-compiler-embeddable" as File
|
||||||
|
//project(':native-platform').projectDir = "$rootDir/tools/native-platform" as File
|
||||||
|
//project(':kotlin-compiler-runner').projectDir = "$rootDir/tools/kotlin-compiler-runner" as File
|
||||||
|
//project(':kotlin-daemon-client').projectDir = "$rootDir/tools/kotlin-daemon-client" as File
|
||||||
|
//project(':kotlin-build-common-test').projectDir = "$rootDir/tools/kotlin-build-common-test" as File
|
||||||
|
//project(':kotlin-maven-plugin').projectDir = "$rootDir/tools/kotlin-maven-plugin" as File
|
||||||
|
//project(':kotlin-osgi-bundle').projectDir = "$rootDir/tools/kotlin-osgi-bundle" as File
|
||||||
|
//project(':kotlin-archetypes-parent:kotlin-archetype-jvm').projectDir = "$rootDir/tools/maven-archetypes/kotlin-archetype-jvm" as File
|
||||||
|
//project(':kotlin-archetypes-parent:kotlin-archetype-js').projectDir = "$rootDir/tools/maven-archetypes/kotlin-archetype-js" as File
|
||||||
|
//project(':kotlin-archetypes-parent').projectDir = "$rootDir/tools/maven-archetypes" as File
|
||||||
|
//project(':binary-compatibility-validator').projectDir = "$rootDir/tools/binary-compatibility-validator" as File
|
||||||
|
//project(':idl2k').projectDir = "$rootDir/tools/idl2k" as File
|
||||||
|
//project(':kotlin-js-tests').projectDir = "$rootDir/tools/kotlin-js-tests" as File
|
||||||
|
//project(':kotlin-js-tests-junit').projectDir = "$rootDir/tools/kotlin-js-tests-junit" as File
|
||||||
|
//project(':kotlin-annotation-processing').projectDir = "$rootDir/tools/kotlin-annotation-processing" as File
|
||||||
|
//project(':kotlin-allopen').projectDir = "$rootDir/tools/kotlin-allopen" as File
|
||||||
|
//project(':kotlin-maven-allopen').projectDir = "$rootDir/tools/kotlin-maven-allopen" as File
|
||||||
|
//project(':kotlin-noarg').projectDir = "$rootDir/tools/kotlin-noarg" as File
|
||||||
|
//project(':kotlin-maven-noarg').projectDir = "$rootDir/tools/kotlin-maven-noarg" as File
|
||||||
|
//project(':kotlin-gradle-plugin').projectDir = "$rootDir/tools/kotlin-gradle-plugin" as File
|
||||||
|
//project(':kotlin-gradle-plugin-api').projectDir = "$rootDir/tools/kotlin-gradle-plugin-api" as File
|
||||||
|
//project(':kotlin-android-extensions').projectDir = "$rootDir/tools/kotlin-android-extensions" as File
|
||||||
|
//project(':kotlin-maven-plugin-test').projectDir = "$rootDir/tools/kotlin-maven-plugin-test" as File
|
||||||
|
//project(':kotlin-script-util').projectDir = "$rootDir/tools/kotlin-script-util" as File
|
||||||
|
//project(':annotation-processor-example').projectDir = "$rootDir/examples/annotation-processor-example" as File
|
||||||
|
//project(':kotlin-java-example').projectDir = "$rootDir/examples/kotlin-java-example" as File
|
||||||
|
//project(':js-example').projectDir = "$rootDir/examples/js-example" as File
|
||||||
|
//project(':kotlin-js-library-example').projectDir = "$rootDir/examples/kotlin-js-library-example" as File
|
||||||
|
//project(':kotlin-gradle-subplugin-example').projectDir = "$rootDir/examples/kotlin-gradle-subplugin-example" as File
|
||||||
|
//project(':browser-example').projectDir = "$rootDir/examples/browser-example" as File
|
||||||
|
//project(':browser-example-with-library').projectDir = "$rootDir/examples/browser-example-with-library" as File
|
||||||
|
//project(':kotlin-jsr223-local-example').projectDir = "$rootDir/examples/kotlin-jsr223-local-example" as File
|
||||||
|
//project(':kotlin-jsr223-daemon-local-eval-example').projectDir = "$rootDir/examples/kotlin-jsr223-daemon-local-eval-example" as File
|
||||||
|
//project(':kotlin-gradle-plugin-integration-tests').projectDir = "$rootDir/tools/kotlin-gradle-plugin-integration-tests" as File
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
description = ''
|
||||||
|
dependencies {
|
||||||
|
compile project(':kotlin-runtime')
|
||||||
|
testCompile project(':kotlin-test-parent:kotlin-test-junit')
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
description = ''
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
description = ''
|
||||||
|
dependencies {
|
||||||
|
compile project(':kotlin-stdlib')
|
||||||
|
testCompile project(':kotlin-test-parent:kotlin-test-junit')
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
description = ''
|
||||||
|
dependencies {
|
||||||
|
compile project(':kotlin-stdlib-jre7')
|
||||||
|
testCompile project(':kotlin-test-parent:kotlin-test-junit')
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
description = ''
|
||||||
|
dependencies {
|
||||||
|
compile project(':kotlin-stdlib')
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile group: 'org.jetbrains', name: 'annotations', version:'13.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
java {
|
||||||
|
srcDir "${rootDir}/../core/builtins/src"
|
||||||
|
srcDir "${rootDir}/../core/runtime.jvm/src"
|
||||||
|
exclude "org/jetbrains/annotations/**"
|
||||||
|
}
|
||||||
|
kotlin {
|
||||||
|
srcDir "${rootDir}/../core/builtins/src"
|
||||||
|
srcDir "${rootDir}/../core/runtime.jvm/src"
|
||||||
|
exclude "org/jetbrains/annotations/**"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
baseName = project.name
|
||||||
|
from("${rootDir}/../dist/builtins")
|
||||||
|
|
||||||
|
manifest {
|
||||||
|
attributes 'Implementation-Title': 'Kotlin Runtime',
|
||||||
|
'Implementation-Version': version,
|
||||||
|
'Kotlin-Runtime-Component': 'Core'
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
archives sourcesJar
|
||||||
|
archives javadocJar
|
||||||
|
}
|
||||||
|
|
||||||
|
compileKotlin {
|
||||||
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-module-name", "${project.name}".toString()]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user