Build common standard library headers and kotlin-test (common and jvm) as multiplatform projects.
This commit is contained in:
+63
-38
@@ -14,6 +14,8 @@ buildscript {
|
|||||||
ext.JDK_16 = System.getenv("JDK_16")
|
ext.JDK_16 = System.getenv("JDK_16")
|
||||||
ext.JDK_17 = System.getenv("JDK_17")
|
ext.JDK_17 = System.getenv("JDK_17")
|
||||||
ext.JDK_18 = System.getenv("JDK_18")
|
ext.JDK_18 = System.getenv("JDK_18")
|
||||||
|
ext.bootstrapCompilerFile = project.file("${rootDir}/../dist/kotlinc/lib/kotlin-compiler.jar")
|
||||||
|
ext.compilerPreloaderFile = project.file("${rootDir}/../dist/kotlinc/lib/kotlin-preloader.jar")
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
@@ -23,45 +25,12 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
apply plugin: 'kotlin'
|
|
||||||
apply plugin: 'signing'
|
apply plugin: 'signing'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
|
||||||
baseName = project.name
|
|
||||||
manifest {
|
|
||||||
attributes 'Implementation-Vendor': 'JetBrains',
|
|
||||||
'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,
|
|
||||||
'Build-Jdk': System.getProperty('java.version'),
|
|
||||||
'Built-By': 'JetBrains'
|
|
||||||
}
|
|
||||||
from("${rootDir}/../dist/kotlinc/build.txt") { into("META-INF/") }
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: use dokka instead?
|
|
||||||
javadoc {
|
|
||||||
failOnError = false
|
|
||||||
}
|
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn:classes) {
|
|
||||||
classifier = 'sources'
|
|
||||||
from sourceSets.main.kotlin
|
|
||||||
}
|
|
||||||
|
|
||||||
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")
|
|
||||||
|
|
||||||
compileKotlin.kotlinOptions.jdkHome = JDK_16
|
|
||||||
|
|
||||||
signing {
|
signing {
|
||||||
required { project.ext.has('signing.keyId') }
|
required { project.ext.has('signing.keyId') }
|
||||||
sign configurations.archives
|
sign configurations.archives
|
||||||
@@ -83,9 +52,65 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static def manifestAttributes(Manifest manifest, Project project, String component) {
|
// plain kotlin jvm projects
|
||||||
manifest.attributes \
|
configure(subprojects.findAll {it.name in [
|
||||||
'Kotlin-Runtime-Component': component,
|
'kotlin-runtime', 'kotlin-script-runtime',
|
||||||
'Kotlin-Version': "${project.kotlin_language_version}",
|
'kotlin-stdlib', 'kotlin-stdlib-jre7', 'kotlin-stdlib-jre8',
|
||||||
'Implementation-Title': "${project.description ?: project.name}"
|
'kotlin-test-junit']}) {
|
||||||
|
|
||||||
|
apply plugin: 'kotlin'
|
||||||
|
|
||||||
|
commonJvmProjectConfiguration(project)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static def commonJvmProjectConfiguration(Project project) {
|
||||||
|
project.configure(project) {
|
||||||
|
jar {
|
||||||
|
manifest {
|
||||||
|
attributes 'Implementation-Vendor': 'JetBrains',
|
||||||
|
'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,
|
||||||
|
'Build-Jdk': System.getProperty('java.version'),
|
||||||
|
'Built-By': 'JetBrains'
|
||||||
|
}
|
||||||
|
from("${rootDir}/../dist/kotlinc/build.txt") { into("META-INF/") }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: use dokka instead?
|
||||||
|
javadoc {
|
||||||
|
failOnError = false
|
||||||
|
}
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar, dependsOn:classes) {
|
||||||
|
classifier = 'sources'
|
||||||
|
from sourceSets.main.kotlin
|
||||||
|
}
|
||||||
|
|
||||||
|
task javadocJar(type: Jar, dependsOn:javadoc) {
|
||||||
|
classifier = 'javadoc'
|
||||||
|
from javadoc.destinationDir
|
||||||
|
}
|
||||||
|
|
||||||
|
compileKotlin.compilerJarFile = bootstrapCompilerFile
|
||||||
|
compileTestKotlin.compilerJarFile = bootstrapCompilerFile
|
||||||
|
|
||||||
|
compileKotlin.kotlinOptions.jdkHome = JDK_16
|
||||||
|
compileTestKotlin.kotlinOptions.jdkHome = JDK_16
|
||||||
|
|
||||||
|
test {
|
||||||
|
executable = "$JDK_16/bin/java"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static def manifestAttributes(Manifest manifest, Project project, String component) {
|
||||||
|
project.configure(manifest) {
|
||||||
|
attributes \
|
||||||
|
'Kotlin-Runtime-Component': component,
|
||||||
|
'Kotlin-Version': "${project.kotlin_language_version}",
|
||||||
|
'Implementation-Title': "${project.description ?: project.name}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
description = 'Kotlin Test Common'
|
||||||
|
|
||||||
|
apply plugin: 'kotlin-platform-common'
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':kotlin-stdlib-common')
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
test {
|
||||||
|
kotlin {
|
||||||
|
srcDir 'src/test'
|
||||||
|
exclude '**'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// common block
|
||||||
|
|
||||||
|
compileKotlinCommon.compilerJarFile = bootstrapCompilerFile
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
jar {
|
||||||
|
baseName = project.name
|
||||||
|
manifest {
|
||||||
|
attributes 'Implementation-Vendor': 'JetBrains',
|
||||||
|
'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,
|
||||||
|
'Build-Jdk': System.getProperty('java.version'),
|
||||||
|
'Built-By': 'JetBrains'
|
||||||
|
}
|
||||||
|
from("${rootDir}/../dist/kotlinc/build.txt") { into("META-INF/") }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: use dokka instead?
|
||||||
|
javadoc {
|
||||||
|
failOnError = false
|
||||||
|
}
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar, dependsOn:classes) {
|
||||||
|
classifier = 'sources'
|
||||||
|
from sourceSets.main.kotlin
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
task javadocJar(type: Jar, dependsOn:javadoc) {
|
||||||
|
classifier = 'javadoc'
|
||||||
|
from javadoc.destinationDir
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package kotlin.jvm
|
|
||||||
|
|
||||||
@Suppress("HEADER_WITHOUT_IMPLEMENTATION")
|
|
||||||
@Target(AnnotationTarget.FILE)
|
|
||||||
internal header annotation class JvmMultifileClass
|
|
||||||
|
|
||||||
@Suppress("HEADER_WITHOUT_IMPLEMENTATION")
|
|
||||||
@Target(AnnotationTarget.FILE)
|
|
||||||
internal header annotation class JvmName(val name: String)
|
|
||||||
@@ -2,25 +2,10 @@
|
|||||||
description = 'Kotlin Test JUnit'
|
description = 'Kotlin Test JUnit'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':kotlin-runtime')
|
compile project(':kotlin-test:kotlin-test-jvm')
|
||||||
compile project(':kotlin-test-parent:kotlin-test')
|
|
||||||
compile('junit:junit:4.12')
|
compile('junit:junit:4.12')
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
kotlin {
|
|
||||||
srcDir 'src/main/kotlin'
|
|
||||||
srcDir 'src/main/kotlin.jvm'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
test {
|
|
||||||
kotlin {
|
|
||||||
srcDir 'src/test/kotlin'
|
|
||||||
srcDir 'src/test/kotlin.jvm'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
|
|||||||
@@ -1,25 +1,17 @@
|
|||||||
|
|
||||||
description = 'Kotlin Test'
|
description = 'Kotlin Test'
|
||||||
|
|
||||||
|
apply plugin: 'kotlin-platform-jvm'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':kotlin-runtime')
|
implement project(':kotlin-test:kotlin-test-common')
|
||||||
|
compile project(':kotlin-stdlib')
|
||||||
testCompile('junit:junit:4.12')
|
testCompile('junit:junit:4.12')
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
commonJvmProjectConfiguration(project)
|
||||||
main {
|
|
||||||
kotlin {
|
archivesBaseName = 'kotlin-test'
|
||||||
srcDir 'src/main/kotlin'
|
|
||||||
srcDir 'src/main/kotlin.jvm'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
test {
|
|
||||||
kotlin {
|
|
||||||
srcDir 'src/test/kotlin'
|
|
||||||
srcDir 'src/test/kotlin.jvm'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
@@ -28,9 +20,6 @@ jar {
|
|||||||
}
|
}
|
||||||
dependsOn classes
|
dependsOn classes
|
||||||
from sourceSets.main.output
|
from sourceSets.main.output
|
||||||
exclude('kotlin/internal/OnlyInputTypes*')
|
|
||||||
exclude('kotlin/internal/InlineOnly*')
|
|
||||||
exclude('kotlin/internal')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
@@ -39,7 +28,8 @@ artifacts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-module-name", "${project.name}".toString()]
|
// TODO: Why "-Xmulti-platfrom" ?
|
||||||
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform", "-module-name", project.archivesBaseName]
|
||||||
}
|
}
|
||||||
|
|
||||||
compileTestKotlin {
|
compileTestKotlin {
|
||||||
+16
-12
@@ -1,15 +1,17 @@
|
|||||||
rootProject.name = 'kotlin-libraries'
|
rootProject.name = 'kotlin-libraries'
|
||||||
include ':kotlin-runtime'
|
include ':kotlin-runtime'
|
||||||
include ':kotlin-script-runtime'
|
include ':kotlin-script-runtime'
|
||||||
include ':kotlin-js-library'
|
//include ':kotlin-js-library'
|
||||||
include ':kotlin-test-parent'
|
include ':kotlin-test'
|
||||||
include ':kotlin-test-parent:kotlin-test'
|
include ':kotlin-test:kotlin-test-common'
|
||||||
include ':kotlin-test-parent:kotlin-test-junit'
|
include ':kotlin-test:kotlin-test-jvm'
|
||||||
//include ':kotlin-stdlib-common'
|
include ':kotlin-test:kotlin-test-junit'
|
||||||
|
//include ':kotlin-test:kotlin-test-js'
|
||||||
|
include ':kotlin-stdlib-common'
|
||||||
include ':kotlin-stdlib'
|
include ':kotlin-stdlib'
|
||||||
include ':kotlin-stdlib-jre7'
|
include ':kotlin-stdlib-jre7'
|
||||||
include ':kotlin-stdlib-jre8'
|
include ':kotlin-stdlib-jre8'
|
||||||
include ':kotlin-reflect'
|
//include ':kotlin-reflect'
|
||||||
|
|
||||||
//include ':kotlin-compiler'
|
//include ':kotlin-compiler'
|
||||||
//include ':kotlin-compiler-embeddable'
|
//include ':kotlin-compiler-embeddable'
|
||||||
@@ -50,15 +52,17 @@ include ':kotlin-reflect'
|
|||||||
|
|
||||||
project(':kotlin-runtime').projectDir = "$rootDir/tools/runtime" as File
|
project(':kotlin-runtime').projectDir = "$rootDir/tools/runtime" as File
|
||||||
project(':kotlin-script-runtime').projectDir = "$rootDir/tools/script-runtime" as File
|
project(':kotlin-script-runtime').projectDir = "$rootDir/tools/script-runtime" as File
|
||||||
project(':kotlin-js-library').projectDir = "$rootDir/tools/kotlin-js-library" as File
|
//project(':kotlin-js-library').projectDir = "$rootDir/tools/kotlin-js-library" as File
|
||||||
project(':kotlin-test-parent').projectDir = "$rootDir/kotlin.test" as File
|
project(':kotlin-test').projectDir = "$rootDir/kotlin.test" as File
|
||||||
project(':kotlin-test-parent:kotlin-test').projectDir = "$rootDir/kotlin.test/shared" as File
|
project(':kotlin-test:kotlin-test-common').projectDir = "$rootDir/kotlin.test/common" as File
|
||||||
project(':kotlin-test-parent:kotlin-test-junit').projectDir = "$rootDir/kotlin.test/junit" as File
|
project(':kotlin-test:kotlin-test-jvm').projectDir = "$rootDir/kotlin.test/jvm" as File
|
||||||
//project(':kotlin-stdlib-common').projectDir = "$rootDir/stdlib/common" as File
|
project(':kotlin-test:kotlin-test-junit').projectDir = "$rootDir/kotlin.test/junit" as File
|
||||||
|
//project(':kotlin-test:kotlin-test-js').projectDir = "$rootDir/kotlin.test/js" as File
|
||||||
|
project(':kotlin-stdlib-common').projectDir = "$rootDir/stdlib/common" as File
|
||||||
project(':kotlin-stdlib').projectDir = "$rootDir/stdlib" as File
|
project(':kotlin-stdlib').projectDir = "$rootDir/stdlib" as File
|
||||||
project(':kotlin-stdlib-jre7').projectDir = "$rootDir/stdlib/jre7" 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-jre8').projectDir = "$rootDir/stdlib/jre8" as File
|
||||||
project(':kotlin-reflect').projectDir = "$rootDir/tools/kotlin-reflect" as File
|
//project(':kotlin-reflect').projectDir = "$rootDir/tools/kotlin-reflect" as File
|
||||||
|
|
||||||
//project(':kotlin-compiler').projectDir = "$rootDir/tools/kotlin-compiler" 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(':kotlin-compiler-embeddable').projectDir = "$rootDir/tools/kotlin-compiler-embeddable" as File
|
||||||
|
|||||||
@@ -18,15 +18,6 @@ sourceSets {
|
|||||||
srcDir 'src'
|
srcDir 'src'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
testLib {
|
|
||||||
kotlin {
|
|
||||||
srcDir '../kotlin.test/common/src/main/kotlin'
|
|
||||||
srcDir '../kotlin.test/jvm/src/main/kotlin'
|
|
||||||
srcDir '../kotlin.test/junit/src/main/kotlin'
|
|
||||||
|
|
||||||
//resources '../kotlin.test/junit/src/main/resources'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
test {
|
test {
|
||||||
kotlin {
|
kotlin {
|
||||||
srcDir 'test'
|
srcDir 'test'
|
||||||
@@ -37,14 +28,8 @@ sourceSets {
|
|||||||
dependencies {
|
dependencies {
|
||||||
builtinsCompile group: 'org.jetbrains', name: 'annotations', version:'13.0'
|
builtinsCompile group: 'org.jetbrains', name: 'annotations', version:'13.0'
|
||||||
compile sourceSets.builtins.output
|
compile sourceSets.builtins.output
|
||||||
// compile project(':kotlin-runtime')
|
|
||||||
// testCompile project(':kotlin-test-parent:kotlin-test-junit')
|
|
||||||
|
|
||||||
testLibCompile sourceSets.builtins.output
|
testCompile project(':kotlin-test:kotlin-test-junit')
|
||||||
//testLibCompile sourceSets.main.output
|
|
||||||
testLibCompile('junit:junit:4.12')
|
|
||||||
testCompile configurations.testLibCompile
|
|
||||||
testCompile sourceSets.testLib.output
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
@@ -71,9 +56,11 @@ artifacts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileBuiltinsKotlin {
|
compileBuiltinsKotlin {
|
||||||
|
compilerJarFile = bootstrapCompilerFile
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jdkHome = JDK_16
|
jdkHome = JDK_16
|
||||||
freeCompilerArgs = [
|
freeCompilerArgs = [
|
||||||
|
"-version",
|
||||||
"-Xallow-kotlin-package",
|
"-Xallow-kotlin-package",
|
||||||
"-Xdump-declarations-to", "${buildDir}/runtime-declarations.json",
|
"-Xdump-declarations-to", "${buildDir}/runtime-declarations.json",
|
||||||
"-cp", "${rootDir}/../dist/builtins",
|
"-cp", "${rootDir}/../dist/builtins",
|
||||||
@@ -85,6 +72,7 @@ compileKotlin {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jdkHome = JDK_16
|
jdkHome = JDK_16
|
||||||
freeCompilerArgs = [
|
freeCompilerArgs = [
|
||||||
|
"-version",
|
||||||
"-Xallow-kotlin-package",
|
"-Xallow-kotlin-package",
|
||||||
"-Xmultifile-parts-inherit",
|
"-Xmultifile-parts-inherit",
|
||||||
"-Xdump-declarations-to", "${buildDir}/stdlib-declarations.json",
|
"-Xdump-declarations-to", "${buildDir}/stdlib-declarations.json",
|
||||||
@@ -92,10 +80,3 @@ compileKotlin {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileTestLibKotlin {
|
|
||||||
kotlinOptions {
|
|
||||||
jdkHome = JDK_16
|
|
||||||
freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,2 +1,68 @@
|
|||||||
|
description = 'Kotlin Common Standard Library'
|
||||||
|
|
||||||
|
apply plugin: 'kotlin-platform-common'
|
||||||
|
|
||||||
|
ext.commonSrcDir = "${buildDir}/common-sources"
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
kotlin {
|
||||||
|
srcDir 'src'
|
||||||
|
srcDir commonSrcDir
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ant.properties.baseDir = projectDir
|
||||||
|
ant.properties.commonSrcDir = commonSrcDir
|
||||||
|
ant.properties.kotlinCompiler = bootstrapCompilerFile.path
|
||||||
|
ant.properties.compilerPreloader = compilerPreloaderFile.path
|
||||||
|
|
||||||
|
ant.importBuild('tasks.xml')
|
||||||
|
|
||||||
|
compileKotlinCommon.dependsOn commonSources
|
||||||
|
|
||||||
|
/*
|
||||||
|
// TODO: currently unsupported
|
||||||
|
compileKotlinCommon {
|
||||||
|
kotlinOptions {
|
||||||
|
freeCompilerArgs = [
|
||||||
|
"-module-name", "${project.name}".toString()
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
compileKotlinCommon.compilerJarFile = bootstrapCompilerFile
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
jar {
|
||||||
|
baseName = project.name
|
||||||
|
manifest {
|
||||||
|
attributes 'Implementation-Vendor': 'JetBrains',
|
||||||
|
'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,
|
||||||
|
'Build-Jdk': System.getProperty('java.version'),
|
||||||
|
'Built-By': 'JetBrains'
|
||||||
|
}
|
||||||
|
from("${rootDir}/../dist/kotlinc/build.txt") { into("META-INF/") }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: use dokka instead?
|
||||||
|
javadoc {
|
||||||
|
failOnError = false
|
||||||
|
}
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar, dependsOn:classes) {
|
||||||
|
classifier = 'sources'
|
||||||
|
from sourceSets.main.kotlin
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
task javadocJar(type: Jar, dependsOn:javadoc) {
|
||||||
|
classifier = 'javadoc'
|
||||||
|
from javadoc.destinationDir
|
||||||
|
}
|
||||||
|
|
||||||
description = ''
|
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<project>
|
||||||
|
<target name="commonSources">
|
||||||
|
<delete dir="${commonSrcDir}" failonerror="false"/>
|
||||||
|
<mkdir dir="${commonSrcDir}"/>
|
||||||
|
<java classname="org.jetbrains.kotlin.preloading.Preloader" failonerror="true" fork="true">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${compilerPreloader}"/>
|
||||||
|
</classpath>
|
||||||
|
<assertions>
|
||||||
|
<enable/>
|
||||||
|
</assertions>
|
||||||
|
<arg value="-cp"/>
|
||||||
|
<arg value="${kotlinCompiler}"/>
|
||||||
|
<arg value="org.jetbrains.kotlin.preprocessor.PreprocessorCLI"/>
|
||||||
|
<arg value="${basedir}/../src/kotlin"/>
|
||||||
|
<arg value="${commonSrcDir}"/>
|
||||||
|
<arg value="JS"/>
|
||||||
|
</java>
|
||||||
|
</target>
|
||||||
|
</project>
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
description = 'Kotlin Standard Library JRE 7 extension'
|
description = 'Kotlin Standard Library JRE 7 extension'
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':kotlin-stdlib')
|
compile project(':kotlin-stdlib')
|
||||||
testCompile project(':kotlin-test-parent:kotlin-test-junit')
|
testCompile project(':kotlin-test:kotlin-test-junit')
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
@@ -42,3 +43,19 @@ compileTestKotlin {
|
|||||||
kotlinOptions.jdkHome = JDK_17
|
kotlinOptions.jdkHome = JDK_17
|
||||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test {
|
||||||
|
executable = "$JDK_17/bin/java"
|
||||||
|
}
|
||||||
|
|
||||||
|
task testJre6Tests(type: Test) {
|
||||||
|
dependsOn project(':kotlin-stdlib').tasks.testClasses
|
||||||
|
group = "verification"
|
||||||
|
|
||||||
|
executable = "$JDK_17/bin/java"
|
||||||
|
|
||||||
|
testClassesDir = project.file('../build/classes/test')
|
||||||
|
classpath = project.files('../build/classes/test') + sourceSets.test.compileClasspath
|
||||||
|
}
|
||||||
|
|
||||||
|
check.dependsOn testJre6Tests
|
||||||
@@ -3,7 +3,7 @@ description = 'Kotlin Standard Library JRE 8 extension'
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile project(':kotlin-stdlib')
|
compile project(':kotlin-stdlib')
|
||||||
compile project(':kotlin-stdlib-jre7')
|
compile project(':kotlin-stdlib-jre7')
|
||||||
testCompile project(':kotlin-test-parent:kotlin-test-junit')
|
testCompile project(':kotlin-test:kotlin-test-junit')
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
@@ -46,3 +46,20 @@ compileTestKotlin {
|
|||||||
kotlinOptions.jvmTarget = 1.8
|
kotlinOptions.jvmTarget = 1.8
|
||||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test {
|
||||||
|
executable = "$JDK_18/bin/java"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
task testJre6Tests(type: Test) {
|
||||||
|
dependsOn project(':kotlin-stdlib').tasks.testClasses
|
||||||
|
group = "verification"
|
||||||
|
|
||||||
|
executable = "$JDK_18/bin/java"
|
||||||
|
|
||||||
|
testClassesDir = project.file('../build/classes/test')
|
||||||
|
classpath = project.files('../build/classes/test') + sourceSets.test.compileClasspath
|
||||||
|
}
|
||||||
|
|
||||||
|
check.dependsOn testJre6Tests
|
||||||
Reference in New Issue
Block a user