84 lines
2.3 KiB
Groovy
84 lines
2.3 KiB
Groovy
|
|
buildscript {
|
|
ext.kotlin_version = "1.1-SNAPSHOT"
|
|
ext.kotlin_language_version = "1.1"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'http://dl.bintray.com/kotlin/kotlin-eap-1.1' }
|
|
}
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.1-M04"
|
|
}
|
|
}
|
|
|
|
ext.JDK_16 = System.getenv("JDK_16")
|
|
ext.JDK_17 = System.getenv("JDK_17")
|
|
ext.JDK_18 = System.getenv("JDK_18")
|
|
|
|
allprojects {
|
|
apply plugin: 'maven'
|
|
|
|
group = 'org.jetbrains.kotlin'
|
|
version = "$kotlin_version"
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'kotlin'
|
|
apply plugin: 'signing'
|
|
|
|
repositories {
|
|
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")
|
|
|
|
signing {
|
|
required { project.ext.has('signing.keyId') }
|
|
sign configurations.archives
|
|
}
|
|
|
|
uploadArchives {
|
|
repositories {
|
|
mavenDeployer {
|
|
repository(url: "file://${rootDir}/localRepo")
|
|
uniqueVersion = false
|
|
pom.version = kotlin_version
|
|
pom.project {
|
|
groupId = project.group
|
|
artifactId = project.name
|
|
version = project.version
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|