curve25519-java/java/build.gradle
Moxie Marlinspike a198b326e6 We're not going to publish common, so the dependent projects
actually need to treat it as a source set.
2015-01-11 13:59:32 -08:00

99 lines
2.4 KiB
Groovy

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
sourceCompatibility = 1.7
archivesBaseName = "curve25519-java"
version = version_number
group = group_info
repositories {
mavenCentral()
}
sourceSets {
main {
java {
srcDirs = ['src/main/java', project(':common').file('src/main/java')]
}
}
}
dependencies {
testCompile project(':tests')
}
signing {
required { has("release") && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
uploadArchives {
configuration = configurations.archives
repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: sonatypeRepo) {
authentication(userName: whisperSonatypeUsername, password: whisperSonatypePassword)
}
pom.project {
name 'curve25519-java'
packaging 'jar'
description 'Curve25519 library for Java'
url 'https://github.com/WhisperSystems/curve25519-java'
scm {
url 'scm:git@github.com:WhisperSystems/curve25519-java.git'
connection 'scm:git@github.com:WhisperSystems/curve25519-java.git'
developerConnection 'scm:git@github.com:WhisperSystems/curve25519-java.git'
}
licenses {
license {
name 'GPLv3'
url 'https://www.gnu.org/licenses/gpl-3.0.txt'
distribution 'repo'
}
}
developers {
developer {
name 'Trevor Perrin'
name 'Moxie Marlinspike'
}
}
}
}
}
task installArchives(type: Upload) {
description "Installs the artifacts to the local Maven repository."
configuration = configurations['archives']
repositories {
mavenDeployer {
repository url: "file://${System.properties['user.home']}/.m2/repository"
}
}
}
task packageJavadoc(type: Jar, dependsOn: 'javadoc') {
from javadoc.destinationDir
classifier = 'javadoc'
}
task packageSources(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives(packageJavadoc) {
type = 'javadoc'
}
archives packageSources
}