diff --git a/build.gradle b/build.gradle index f8e6eac..8a98573 100644 --- a/build.gradle +++ b/build.gradle @@ -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' + } + } + } + } + } + } } \ No newline at end of file diff --git a/demo/build.gradle b/demo/build.gradle index ae7579e..3881faf 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -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' } diff --git a/domain/build.gradle b/domain/build.gradle index 215798a..eb83499 100644 --- a/domain/build.gradle +++ b/domain/build.gradle @@ -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' diff --git a/networking/build.gradle b/networking/build.gradle index 3b5def4..07d268e 100644 --- a/networking/build.gradle +++ b/networking/build.gradle @@ -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' diff --git a/repositories/build.gradle b/repositories/build.gradle index 231dbdb..2f467b8 100644 --- a/repositories/build.gradle +++ b/repositories/build.gradle @@ -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'