| buildscript { |
| ext.kotlin_root = "$rootDir/.." |
| apply from: 'versions.gradle' |
| |
| repositories { |
| mavenCentral() |
| } |
| dependencies { |
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_gradle_plugin_version}" |
| } |
| } |
| |
| allprojects { |
| group = 'org.jetbrains.kotlin' |
| version = "$kotlin_version" |
| } |
| |
| apply from: 'commonConfiguration.gradle' |
| |
| subprojects { |
| |
| repositories { |
| mavenCentral() |
| } |
| |
| configurations { |
| scriptCompile |
| scriptRuntime.extendsFrom(scriptCompile) |
| } |
| |
| dependencies { |
| scriptCompile "org.jetbrains.kotlin:kotlin-compiler-embeddable:${kotlin_gradle_plugin_version}" |
| } |
| |
| tasks.withType(org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile) { |
| compilerJarFile = bootstrapCompilerFile |
| } |
| tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) { |
| kotlinOptions { |
| languageVersion = kotlin_language_version |
| apiVersion = kotlin_language_version |
| } |
| } |
| |
| task javadocJar(type: Jar) { |
| classifier = 'javadoc' |
| } |
| |
| } |
| |
| task clean { |
| doLast { |
| delete "${buildDir}/repo" |
| } |
| } |
| |
| if (isSonatypeRelease) { |
| println 'Applying configuration for sonatype release' |
| apply from: 'prepareSonatypeStaging.gradle' |
| } |