a4be282074
Add option to disable signing (-PnoSign), to be used when publishing pre-built artifacts Add option to define specific version for publishing, to be used when publishing test versions (cherry picked from commit dcd55e9)
86 lines
2.2 KiB
Groovy
86 lines
2.2 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}"]
|
|
}
|
|
}
|
|
}
|
|
|
|
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"
|
|
}
|
|
}
|
|
} |