Skip to content

Commit

Permalink
Update build script to allow publishing the jar library as well as bu…
Browse files Browse the repository at this point in the history
…ilding javadoc and sources jar
  • Loading branch information
dukke committed Apr 11, 2018
1 parent b1f53bb commit 91bccf4
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 3 deletions.
55 changes: 53 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,65 @@
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id "com.jfrog.bintray" version "1.7.3"
id "java-library"
id "maven-publish"
}

sourceCompatibility = '1.8'

group = 'com.pixelduke'
version = '1.0.0'

[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

jar {
manifest {
attributes( 'Implementation-Title': project.name,
'Implementation-Version': project.version)
}
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourceJar(type: Jar) {
from sourceSets.main.allJava
classifier "sources"
}

bintray {
user = property('BINTRAY_USER')
key = property('BINTRAY_KEY')
pkg {
repo = 'maven'
name = 'FXRibbon'
//userOrg = 'dukke'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/dukke/FXRibbon.git'
publications = ['mavenJava']
websiteUrl = 'https://www.pixelduke.com/fxribbon'
issueTrackerUrl = 'https://github.com/dukke/FXRibbon/issues'
publicDownloadNumbers = true
version {
name = '1.0.0'
desc = 'FXRibbon First release' // Version description
vcsTag = '1.0.0'
}
}
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
}
}
}

3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Tue Apr 10 00:36:23 BST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-all.zip

0 comments on commit 91bccf4

Please sign in to comment.