Skip to content

Commit

Permalink
update org to kotlin; working upload script for Maven plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
yole committed Nov 9, 2015
1 parent 057ff29 commit e847b51
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
24 changes: 21 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,32 @@ task updatePom << {
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")
}

def uploadDir = new File("maven-plugin/upload")
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')

pkg {
repo = 'dokka'
name = 'dokka'
userOrg = 'jetbrains'
userOrg = 'kotlin'
desc = 'Dokka, the Kotlin documentation tool'
vcsUrl = 'https://github.com/kotlin/dokka.git'
licenses = ['Apache-2.0']
Expand All @@ -30,7 +48,7 @@ bintray {
}

filesSpec {
from 'maven-plugin/target/dokka-maven-plugin-*.jar'
into ''
from 'maven-plugin/upload'
into "/kotlin/dokka/dokka/${dokka_version}/org/jetbrains/dokka/dokka-maven-plugin/${dokka_version}"
}
}
2 changes: 1 addition & 1 deletion dokka-fatjar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ bintray {
pkg {
repo = 'dokka'
name = 'dokka'
userOrg = 'jetbrains'
userOrg = 'kotlin'
desc = 'Dokka, the Kotlin documentation tool'
vcsUrl = 'https://github.com/kotlin/dokka.git'
licenses = ['Apache-2.0']
Expand Down
2 changes: 1 addition & 1 deletion dokka-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ bintray {
pkg {
repo = 'dokka'
name = 'dokka'
userOrg = 'jetbrains'
userOrg = 'kotlin'
desc = 'Dokka, the Kotlin documentation tool'
vcsUrl = 'https://github.com/kotlin/dokka.git'
licenses = ['Apache-2.0']
Expand Down

0 comments on commit e847b51

Please sign in to comment.