Skip to content

Commit

Permalink
Configure Bintray publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelRocks committed Apr 2, 2016
1 parent 00f1435 commit 99bff87
Showing 1 changed file with 52 additions and 3 deletions.
55 changes: 52 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
group 'io.michaelrocks'
version '1.0.0'

buildscript {
ext.kotlinVersion = '1.0.1-2'
repositories {
Expand All @@ -11,9 +8,16 @@ buildscript {
}
}

plugins {
id "com.jfrog.bintray" version "1.6"
}

apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'

group 'io.michaelrocks'
version '1.0.0'
sourceCompatibility = 1.6

repositories {
Expand All @@ -24,3 +28,48 @@ dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
testCompile 'junit:junit:4.12'
}

bintray {
user = project.property('bintrayUser')
key = project.property('bintrayKey')
publications = ['mavenJava']

pkg {
repo = 'maven'
name = 'bimap'

version {
name = project.version
released = new Date()
vcsTag = "v${project.version}"
}
}
}

task sourcesJar(type: Jar, dependsOn: project.classes) {
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: project.javadoc) {
from javadoc.destinationDir
}

artifacts {
archives sourcesJar, javadocJar
}

publishing {
publications {
mavenJava(MavenPublication) {
artifactId project.bintray.pkg.name
from components.java

artifact sourcesJar {
classifier = 'sources'
}
artifact javadocJar {
classifier = 'javadoc'
}
}
}
}

0 comments on commit 99bff87

Please sign in to comment.