Skip to content

Commit

Permalink
added config for bintray
Browse files Browse the repository at this point in the history
  • Loading branch information
jscancella committed Oct 26, 2018
1 parent cc034e1 commit cb05235
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ bin/
build/
hs_err_pid*
bagit-conformance-suite/
gradle.properties
107 changes: 107 additions & 0 deletions bintray.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
//This build file is for all the configuration specifics of building and deploying to jcenter (bintray)
apply plugin: "maven"
apply plugin: "maven-publish"
apply plugin: "java-library"

if(!project.hasProperty("bintrayUser")){ //so CI doesn't break
project.ext.bintrayUser = "foo"
project.ext.bintrayApiKey = "foo"
}

if(!project.hasProperty("ossrhUsername")){ //so CI doesn't break
project.ext.ossrhUsername = "foo"
project.ext.ossrhPassword = "foo"
}

task javadocJar(type: Jar) {
group "Build"
description "Create the jar that contains all the class documentation (javadoc)."
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
group "Build"
description "Create the jar that contains all the .class files."
classifier = 'sources'
from sourceSets.main.allSource
}

bintray {
user = project.ext.bintrayUser
key = project.ext.bintrayApiKey

publications = ['BagitPublication']

publish = false //Whether version should be auto published after an upload

pkg {
repo = "com.github.jscancella"
name = "bagging"
userOrg = user
desc = "This is a software library intended to support the creation, manipulation, and validation of 'bags' from the bagit specification. It currently supports version 0.93 through 1.0."
websiteUrl = "https://github.com/jscancella/bagging"
issueTrackerUrl = "https://github.com/jscancella/bagging/issues"
licenses = ["AGPL-V3"]
vcsUrl = "https://github.com/jscancella/bagging"
labels = ["bagit", "bagging"]
publicDownloadNumbers = true
githubRepo = 'jscancella/bagging'
githubReleaseNotesFile = 'README.md'

version{
name = project.version
vcsTag = 'v' + project.version
// mavenCentralSync{
// user = ossrhUsername
// password = ossrhPassword
// close = '0' //release the version manually on Maven Central
// }
}
}
}

def pomConfig = {
licenses {
license {
name 'AGPL-V3'
url 'https://github.com/jscancella/bagging/blob/master/LICENSE.txt'
}
}

developers {
developer {
id 'jscancella'
name 'John Scancella'
email '[email protected]'
}
}

scm {
connection 'scm:git:https://github.com/jscancella/bagging'
developerConnection 'scm:git:ssh://github.com/jscancella/bagging'
url 'https://github.com/jscancella/bagging'
}
}

publishing {
publications {
BagitPublication(MavenPublication) {
from components.java
artifact sourcesJar //needed for syncing with maven central
artifact javadocJar //needed for syncing with maven central

groupId 'com.github.jscancella'
artifactId 'bagging'
version project.version

pom.withXml{
def root = asNode()
root.appendNode('description', 'This is a software library intended to support the creation, manipulation, and validation of "bags" from the bagit specification. It currently supports version 0.93 through 1.0.')
root.appendNode('name', 'bagging')
root.appendNode('url', 'https://github.com/jscancella/bagging')
root.children().last() + pomConfig
}
}
}
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
id "com.jfrog.bintray" version "1.8.2"
}
apply from: 'eclipse.gradle'
//apply from: 'bintray.gradle'
apply from: 'bintray.gradle'
//apply from: 'maven-central.gradle'
apply from: 'code-quality.gradle'
apply from: 'message-bundle.gradle'
Expand Down

0 comments on commit cb05235

Please sign in to comment.