diff options
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/build.gradle b/build.gradle index 0b5d5dbc..73636b24 100644 --- a/build.gradle +++ b/build.gradle @@ -1,25 +1,36 @@ import org.jetbrains.DependenciesVersionGetter allprojects { + ext { + if (!project.findProperty("dokka_version")) { + final String buildNumber = System.getenv("BUILD_NUMBER") + dokka_version = dokka_version_base + (buildNumber == null || System.getenv("FORCE_SNAPSHOT") != null ? "-SNAPSHOT" : "-$buildNumber") + } + } + + if (project == rootProject) { + println "Publication version: $dokka_version" + } + group 'org.jetbrains.dokka' version dokka_version def repo = { artifactPattern("https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_dev_CompilerAllPlugins/[revision]/internal/[module](.[ext])") + artifactPattern("https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_dev_CompilerAllPlugins/[revision]/[module](.[ext])") artifactPattern("https://teamcity.jetbrains.com/guestAuth/repository/download/IntelliJMarkdownParser_Build/[revision]/([module]_[ext]/)[module](.[ext])") } buildscript { repositories { mavenCentral() - jcenter() maven { url "https://dl.bintray.com/kotlin/kotlin-eap" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } maven { url "https://plugins.gradle.org/m2/" } ivy(repo) } dependencies { - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7' + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1' classpath "com.gradle.publish:plugin-publish-plugin:0.9.10" @@ -27,15 +38,17 @@ allprojects { } repositories { + jcenter() mavenCentral() mavenLocal() - maven { url "https://dl.bintray.com/jetbrains/markdown" } + maven { url "https://dl.bintray.com/jetbrains/markdown" } maven { url "https://dl.bintray.com/kotlin/kotlin-eap" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } - maven { url 'https://jitpack.io' } maven { url "https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_dev_CompilerAllPlugins/$bundled_kotlin_compiler_version/maven" } ivy(repo) - maven { url "https://dl.bintray.com/kotlin/kotlinx.html" } + maven { url "https://kotlin.bintray.com/kotlinx" } + maven { url "https://dl.bintray.com/kotlin/kotlinx" } + maven { url "https://dl.bintray.com/orangy/maven" } // TODO: remove this repository when kotlinx.cli is available in maven } } @@ -65,11 +78,6 @@ def bintrayPublication(project, List<String> _publications) { }) } -task wrapper(type: Wrapper) { - gradleVersion = '4.2.1' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - def versions = DependenciesVersionGetter.getVersions(project, bundled_kotlin_compiler_version) ext.ideaVersion = versions["idea.build.id"] @@ -104,6 +112,22 @@ def ideaRT() { def repoLocation = uri(file("$buildDir/dist-maven")) +configurations { + kotlin_plugin_full +} + +dependencies { + final String ijVersion = "20" + ideaVersion.take(2) + "." + ideaVersion[2] + kotlin_plugin_full "teamcity:kotlin-plugin-$bundled_kotlin_compiler_version-IJ$ijVersion-1:$bundled_kotlin_compiler_version@zip" +} + +def kotlinPluginDependency() { + return zipTree(configurations.kotlin_plugin_full.singleFile).matching({ + include("Kotlin/lib/kotlin-plugin.jar") + }) +} + + allprojects { task publishToDistMaven { |