aboutsummaryrefslogtreecommitdiffstats
path: root/java/build.gradle
diff options
context:
space:
mode:
authorMoxie Marlinspike <moxie@thoughtcrime.org>2015-01-08 13:48:49 -0800
committerMoxie Marlinspike <moxie@thoughtcrime.org>2015-01-08 14:09:01 -0800
commit6445ea5f13850f42c3952bd06a2369317683ed88 (patch)
treef2bb37c8cf4710ff6a6a37a3e7e702c5a21ca504 /java/build.gradle
parenta4d8f7f6a4c4e9e89db35f299e558dceee2362a1 (diff)
Break project up into Java and Android build/test.
Diffstat (limited to 'java/build.gradle')
-rw-r--r--java/build.gradle83
1 files changed, 83 insertions, 0 deletions
diff --git a/java/build.gradle b/java/build.gradle
new file mode 100644
index 00000000..11834e6b
--- /dev/null
+++ b/java/build.gradle
@@ -0,0 +1,83 @@
+apply plugin: 'java'
+apply plugin: 'maven'
+apply plugin: 'signing'
+
+sourceCompatibility = 1.7
+archivesBaseName = "axolotl-java"
+version = version_number
+group = group_info
+
+repositories {
+ mavenCentral()
+ mavenLocal()
+}
+
+sourceSets {
+ test {
+ java {
+ srcDirs = ['src/test/java/', project(':tests').file('src/main/java')]
+ }
+ }
+}
+
+dependencies {
+ compile "org.whispersystems:curve25519-java:${curve25519_version}"
+ compile 'com.google.protobuf:protobuf-java:2.5.0'
+
+ testCompile ('junit:junit:3.8.2')
+}
+
+
+test {
+ testLogging {
+ events 'passed'
+ showStandardStreams = true
+ }
+
+ include 'org/whispersystems/**'
+}
+
+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 'axolotl-java'
+ packaging 'jar'
+ description 'Axolotl library for Java'
+ url 'https://github.com/WhisperSystems/libaxolotl-android'
+
+ scm {
+ url 'scm:git@github.com:WhisperSystems/libaxolotl-android.git'
+ connection 'scm:git@github.com:WhisperSystems/libaxolotl-android.git'
+ developerConnection 'scm:git@github.com:WhisperSystems/libaxolotl-android.git'
+ }
+
+ developers {
+ developer {
+ 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"
+ }
+ }
+}