Added some stuff necessary to publish to maven central - I hope it still builds on travis

This commit is contained in:
Christian Basler 2015-06-21 08:58:49 +02:00
parent 607e777a7a
commit fefefe6809
5 changed files with 97 additions and 4 deletions

View File

@ -1,4 +1,4 @@
allprojects {
subprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
@ -25,7 +25,52 @@ allprojects {
archives javadocJar, sourcesJar
}
// signing {
// sign configurations.archives
// }
// Note: to build the project, you'll either need to
if (hasProperty('signing.keyId')) {
signing {
sign configurations.archives
}
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Jabit'
packaging 'jar'
url 'https://github.com/Dissem/Jabit'
scm {
connection 'scm:git:https://github.com/Dissem/Jabit.git'
developerConnection 'scm:git:git@github.com:Dissem/Jabit.git'
url 'https://github.com/Dissem/Jabit.git'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name 'Christian Basler'
email 'chrigu.meyer@gmail.com'
}
}
}
}
}
}
}

View File

@ -2,6 +2,18 @@ plugins {
id "us.kirchmeier.capsule" version "1.0-rc1"
}
uploadArchives {
repositories {
mavenDeployer {
pom.project {
name 'Jabit Demo'
artifactId = 'jabit-demo'
description 'An example Bitmessage client using Jabit.'
}
}
}
}
task fatCapsule(type: FatCapsule) {
applicationClass 'ch.dissem.bitmessage.demo.Main'
}

View File

@ -1,3 +1,15 @@
uploadArchives {
repositories {
mavenDeployer {
pom.project {
name 'Jabit Domain'
artifactId = 'jabit-domain'
description 'A Java implementation of the Bitmessage protocol. This is the core part. You\'ll either need the networking and repositories modules, too, or implement your own.'
}
}
}
}
dependencies {
compile 'org.slf4j:slf4j-api:1.7.12'
compile 'org.bouncycastle:bcprov-jdk15on:1.52'

View File

@ -1,3 +1,15 @@
uploadArchives {
repositories {
mavenDeployer {
pom.project {
name 'Jabit Networking'
artifactId = 'jabit-networking'
description 'A Java implementation of the Bitmessage protocol. This is the networking part.'
}
}
}
}
dependencies {
compile project(':domain')
testCompile 'org.slf4j:slf4j-simple:1.7.12'

View File

@ -1,3 +1,15 @@
uploadArchives {
repositories {
mavenDeployer {
pom.project {
name 'Jabit Domain'
artifactId = 'jabit-repositories'
description 'A Java implementation of the Bitmessage protocol. This contains JDBC implementations of the repositories.'
}
}
}
}
dependencies {
compile project(':domain')
compile 'com.h2database:h2:1.4.187'