aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorSimon Ogorodnik <sem-oro@yandex.ru>2016-11-01 02:10:32 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2016-11-01 14:46:01 +0300
commit769701f99a1aefbc9d385c1938c9c7d3a7b2e38e (patch)
treec3ea4802d9e627c90870808aba9343eb224a114c /build.gradle
parent08bcaa257f7b48929af6ee29007dd6f0d7bb1b52 (diff)
downloaddokka-769701f99a1aefbc9d385c1938c9c7d3a7b2e38e.tar.gz
Total build refactoring, prepare for new development iteration
Removed old and useless build helpers Remove old .xml's from .idea and add .idea/shelf to .gitignore build-docs.xml fixed, dokka_version set to 0.9.10
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle84
1 files changed, 30 insertions, 54 deletions
diff --git a/build.gradle b/build.gradle
index bcf2ba7df..45ccfe4d5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,8 +1,7 @@
-plugins {
- id "com.jfrog.bintray" version "1.4"
-}
-
allprojects {
+ group 'org.jetbrains.dokka'
+ version dokka_version
+
buildscript {
repositories {
mavenCentral()
@@ -14,10 +13,15 @@ allprojects {
url "https://dl.bintray.com/kotlin/kotlin-dev"
}
}
+ dependencies {
+ classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
+ classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
+ }
}
repositories {
mavenCentral()
+ mavenLocal()
maven {
url "https://dl.bintray.com/kotlin/kotlin-eap"
}
@@ -27,56 +31,28 @@ allprojects {
}
}
-apply plugin: 'maven-publish'
-
-task updatePom << {
- def parser = new XmlParser()
- def pomFile = new File("maven-plugin/pom.xml")
- def pom = parser.parse(pomFile)
- pom.version[0].setValue(dokka_version)
- pom.properties.kotlinVersion[0].setValue(kotlin_version)
- pomFile.setText(groovy.xml.XmlUtil.serialize(pom))
-}
-
-task buildMavenPlugin << {
- def process = "mvn clean package".execute(null, new File("maven-plugin"))
- process.waitFor()
- def mvnOutput = process.text
- def exitValue = process.exitValue()
- if (exitValue != 0) {
- throw new IOException("Failed to run Maven command: exit value $exitValue, output $mvnOutput")
- }
-}
-task prepareMavenPluginUpload << {
- def uploadDir = new File("maven-plugin/upload")
- uploadDir.delete()
- uploadDir.mkdirs()
- def releaseFileName = "dokka-maven-plugin-${dokka_version}"
- new File("maven-plugin/target/${releaseFileName}.jar").renameTo(new File(uploadDir, "${releaseFileName}.jar"))
- new File(uploadDir, "${releaseFileName}.pom").bytes = new File("maven-plugin/pom.xml").bytes
-}
-
-buildMavenPlugin.dependsOn(updatePom)
-
-bintray {
- user = System.getenv('BINTRAY_USER')
- key = System.getenv('BINTRAY_KEY')
+def bintrayPublication(project, List<String> _publications) {
+ configure(project, {
+ apply plugin: 'com.jfrog.bintray'
+
+ bintray {
+ user = System.getenv('BINTRAY_USER')
+ key = System.getenv('BINTRAY_KEY')
+
+ pkg {
+ repo = dokka_eap.toBoolean() ? 'kotlin-eap' : 'dokka'
+ name = 'dokka'
+ userOrg = 'kotlin'
+ desc = 'Dokka, the Kotlin documentation tool'
+ vcsUrl = 'https://github.com/kotlin/dokka.git'
+ licenses = ['Apache-2.0']
+ version {
+ name = dokka_version
+ }
+ }
- pkg {
- repo = dokka_eap.toBoolean() ? 'kotlin-eap' : 'dokka'
- name = 'dokka'
- userOrg = 'kotlin'
- desc = 'Dokka, the Kotlin documentation tool'
- vcsUrl = 'https://github.com/kotlin/dokka.git'
- licenses = ['Apache-2.0']
- version {
- name = dokka_version
+ publications = _publications
}
- }
-
- filesSpec {
- from 'maven-plugin/upload'
- into "org/jetbrains/dokka/dokka-maven-plugin/${dokka_version}"
- }
-}
+ })
+} \ No newline at end of file