session-android/java/build.gradle

103 lines
2.7 KiB
Groovy
Raw Normal View History

apply plugin: 'java'
apply plugin: 'maven'
2015-02-28 16:38:22 -08:00
apply plugin: 'signing'
sourceCompatibility = 1.7
archivesBaseName = "textsecure-java"
version = version_number
group = group_info
repositories {
mavenCentral()
2015-02-28 16:38:22 -08:00
mavenLocal()
}
dependencies {
compile 'com.google.protobuf:protobuf-java:2.5.0'
compile 'com.googlecode.libphonenumber:libphonenumber:6.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.5.0'
2015-02-28 16:38:22 -08:00
compile "org.whispersystems:axolotl-java:${axolotl_version}"
compile 'com.squareup.okhttp:okhttp:2.2.0'
compile 'org.apache.httpcomponents:httpclient:4.4'
2015-02-28 16:08:13 -08:00
testCompile 'junit:junit:3.8.2'
}
tasks.whenTaskAdded { task ->
if (task.name.equals("lint")) {
task.enabled = false
}
}
2015-02-28 16:38:22 -08:00
signing {
required { has("release") && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
uploadArchives {
2015-02-28 16:38:22 -08:00
configuration = configurations.archives
repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: sonatypeRepo) {
authentication(userName: whisperSonatypeUsername, password: whisperSonatypePassword)
}
pom.project {
name 'textscure-java'
packaging 'jar'
description 'TetSecure library for Java'
url 'https://github.com/WhisperSystems/libtextsecure-java'
scm {
url 'scm:git@github.com:WhisperSystems/libtextsecure-java.git'
connection 'scm:git@github.com:WhisperSystems/libtextsecure-java.git'
developerConnection 'scm:git@github.com:WhisperSystems/libtextsecure-java.git'
}
licenses {
license {
name 'GPLv3'
url 'https://www.gnu.org/licenses/gpl-3.0.txt'
distribution 'repo'
}
}
developers {
developer {
name 'Moxie Marlinspike'
}
}
}
}
}
task installArchives(type: Upload) {
description "Installs the artifacts to the local Maven repository."
configuration = configurations['archives']
repositories {
mavenDeployer {
2015-02-28 16:38:22 -08:00
repository url: "file://${System.properties['user.home']}/.m2/repository"
}
}
}
2015-02-28 16:38:22 -08:00
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
}