1174c7bdd9
(cherry picked from commit 450345b)
95 lines
2.4 KiB
Groovy
95 lines
2.4 KiB
Groovy
buildscript {
|
|
ext.kotlin_root = "$rootDir/../../.."
|
|
apply from: "${kotlin_root}/libraries/versions.gradle"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'https://plugins.gradle.org/m2/' }
|
|
}
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_gradle_plugin_version}"
|
|
classpath "com.gradle.publish:plugin-publish-plugin:0.9.7"
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
group = 'org.jetbrains.kotlin'
|
|
version = "$kotlin_version"
|
|
}
|
|
|
|
apply from: "${kotlin_root}/libraries/commonConfiguration.gradle"
|
|
|
|
subprojects {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile) {
|
|
compilerJarFile = bootstrapCompilerFile
|
|
}
|
|
|
|
task javadocJar(type: Jar) {
|
|
classifier = 'javadoc'
|
|
}
|
|
|
|
afterEvaluate {
|
|
jar {
|
|
manifestAttributes(manifest, project)
|
|
}
|
|
|
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile).all { task ->
|
|
task.kotlinOptions.freeCompilerArgs += ["-module-name", "${project.name}"]
|
|
}
|
|
|
|
artifacts {
|
|
if (tasks.findByName('javadocJar')) {
|
|
archives javadocJar
|
|
}
|
|
if (tasks.findByName('sourcesJar')) {
|
|
archives sourcesJar
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
task clean {
|
|
doLast {
|
|
delete "${buildDir}/repo"
|
|
}
|
|
}
|
|
|
|
configure([project(':kotlin-gradle-plugin'), project(':kotlin-allopen'), project(':kotlin-noarg')]) { project ->
|
|
apply plugin: 'com.gradle.plugin-publish'
|
|
|
|
if (project.hasProperty('publishPluginsVersion')) {
|
|
configurations.archives.artifacts.all {
|
|
version = project.getProperty('publishPluginsVersion')
|
|
}
|
|
}
|
|
|
|
if (project.hasProperty("${project.name}-jar")) {
|
|
println("Using pre-built artifact for ${project.name}")
|
|
configurations.archives.artifacts.clear()
|
|
|
|
artifacts {
|
|
archives(file(project.getProperty("${project.name}-jar"))) {
|
|
name project.name
|
|
}
|
|
}
|
|
}
|
|
|
|
publishPlugins.doFirst {
|
|
assert !kotlin_version.contains('SNAPSHOT')
|
|
}
|
|
|
|
pluginBundle {
|
|
website = 'https://kotlinlang.org/'
|
|
vcsUrl = 'https://github.com/JetBrains/kotlin/'
|
|
description = 'Kotlin plugins for Gradle'
|
|
tags = ['kotlin']
|
|
|
|
mavenCoordinates {
|
|
groupId = "org.jetbrains.kotlin"
|
|
}
|
|
}
|
|
} |