Tiem Song | e1dd512 | 2019-07-03 14:16:39 -0700 | [diff] [blame] | 1 | import org.jetbrains.DependenciesVersionGetter |
| 2 | |
| 3 | allprojects { |
| 4 | group 'org.jetbrains.dokka' |
| 5 | version dokka_version |
| 6 | |
| 7 | def repo = { |
| 8 | artifactPattern("https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_dev_CompilerAllPlugins/[revision]/internal/[module](.[ext])") |
| 9 | artifactPattern("https://teamcity.jetbrains.com/guestAuth/repository/download/IntelliJMarkdownParser_Build/[revision]/([module]_[ext]/)[module](.[ext])") |
| 10 | } |
| 11 | |
| 12 | buildscript { |
| 13 | repositories { |
| 14 | mavenCentral() |
| 15 | jcenter() |
| 16 | maven { url "http://dl.bintray.com/kotlin/kotlin-eap" } |
| 17 | maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } |
| 18 | maven { url "https://plugins.gradle.org/m2/" } |
| 19 | ivy(repo) |
| 20 | } |
| 21 | dependencies { |
| 22 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7' |
| 23 | classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1' |
| 24 | |
| 25 | classpath "com.gradle.publish:plugin-publish-plugin:0.9.10" |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | repositories { |
| 30 | mavenCentral() |
| 31 | mavenLocal() |
| 32 | maven { url "https://dl.bintray.com/jetbrains/markdown" } |
| 33 | maven { url "http://dl.bintray.com/kotlin/kotlin-eap" } |
| 34 | maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } |
| 35 | maven { url 'https://jitpack.io' } |
| 36 | maven { url "https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_dev_CompilerAllPlugins/$bundled_kotlin_compiler_version/maven" } |
| 37 | ivy(repo) |
| 38 | maven { url "https://dl.bintray.com/kotlin/kotlinx.html" } |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | |
| 43 | def bintrayPublication(project, List<String> _publications) { |
| 44 | configure(project, { |
| 45 | apply plugin: 'com.jfrog.bintray' |
| 46 | |
| 47 | bintray { |
| 48 | user = System.getenv('BINTRAY_USER') |
| 49 | key = System.getenv('BINTRAY_KEY') |
| 50 | |
| 51 | pkg { |
| 52 | repo = dokka_publication_channel |
| 53 | name = 'dokka' |
| 54 | userOrg = 'kotlin' |
| 55 | desc = 'Dokka, the Kotlin documentation tool' |
| 56 | vcsUrl = 'https://github.com/kotlin/dokka.git' |
| 57 | licenses = ['Apache-2.0'] |
| 58 | version { |
| 59 | name = dokka_version |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | publications = _publications |
| 64 | } |
| 65 | }) |
| 66 | } |
| 67 | |
| 68 | task wrapper(type: Wrapper) { |
| 69 | gradleVersion = '4.2.1' |
| 70 | distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" |
| 71 | } |
| 72 | |
| 73 | def versions = DependenciesVersionGetter.getVersions(project, bundled_kotlin_compiler_version) |
| 74 | |
| 75 | ext.ideaVersion = versions["idea.build.id"] |
| 76 | ext.markdownVersion = versions["markdown.build.id"].replace("%20", " ") |
| 77 | |
| 78 | configurations { |
| 79 | ideaIC |
| 80 | intellijCore |
| 81 | } |
| 82 | |
| 83 | repositories { |
| 84 | maven { url 'https://www.jetbrains.com/intellij-repository/snapshots' } |
| 85 | maven { url 'https://www.jetbrains.com/intellij-repository/releases' } |
| 86 | } |
| 87 | |
| 88 | dependencies { |
| 89 | intellijCore "com.jetbrains.intellij.idea:intellij-core:$ideaVersion" |
| 90 | ideaIC "com.jetbrains.intellij.idea:ideaIC:$ideaVersion" |
| 91 | } |
| 92 | |
| 93 | def intellijCoreAnalysis() { |
| 94 | return zipTree(configurations.intellijCore.singleFile).matching ({ |
| 95 | include("intellij-core-analysis.jar") |
| 96 | }) |
| 97 | } |
| 98 | |
| 99 | def ideaRT() { |
| 100 | return zipTree(project.configurations.ideaIC.singleFile).matching ({ |
| 101 | include("lib/idea_rt.jar") |
| 102 | }) |
| 103 | } |
| 104 | |
| 105 | def repoLocation = uri(file("$buildDir/dist-maven")) |
| 106 | |
| 107 | allprojects { |
| 108 | |
| 109 | task publishToDistMaven { |
| 110 | group "publishing" |
| 111 | description "Publishes all Maven publications to Maven repository 'distMaven'." |
| 112 | dependsOn tasks.withType(PublishToMavenRepository).matching { |
| 113 | it.repository == publishing.repositories.distMaven |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | plugins.withType(MavenPublishPlugin) { |
| 118 | publishing { |
| 119 | repositories { |
| 120 | maven { |
| 121 | name 'distMaven' |
| 122 | url repoLocation |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | } |
| 128 | } |