mirror of
https://github.com/signalapp/libsignal.git
synced 2026-05-03 13:02:20 +02:00
98 lines
2.2 KiB
Groovy
98 lines
2.2 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id 'signing'
|
|
}
|
|
|
|
sourceCompatibility = 1.8
|
|
archivesBaseName = "libsignal-server"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
mavenLocal()
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
// Include libsignal sources shared between the client and server
|
|
srcDir '../shared/java'
|
|
}
|
|
resources {
|
|
srcDir '../shared/resources'
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation 'junit:junit:4.12'
|
|
}
|
|
|
|
test {
|
|
testLogging {
|
|
events 'passed'
|
|
showStandardStreams = true
|
|
showExceptions true
|
|
exceptionFormat 'full'
|
|
showCauses true
|
|
showStackTraces true
|
|
}
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
withJavadocJar()
|
|
}
|
|
|
|
processResources {
|
|
// TODO: Build a different variant of the JNI library for server.
|
|
dependsOn ':makeJniLibrariesDesktop'
|
|
dependsOn ':downloadNonLinuxLibraries'
|
|
gradle.taskGraph.whenReady { graph ->
|
|
if (graph.hasTask(":server:publish")) {
|
|
tasks.getByPath(":downloadNonLinuxLibraries").enabled = true
|
|
}
|
|
}
|
|
}
|
|
|
|
// MARK: Publishing
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
artifactId = archivesBaseName
|
|
from components.java
|
|
|
|
pom {
|
|
name = archivesBaseName
|
|
description = 'Signal Protocol cryptography library for Java (server-side)'
|
|
url = 'https://github.com/signalapp/libsignal'
|
|
|
|
scm {
|
|
url = 'scm:git@github.com:signalapp/libsignal.git'
|
|
connection = 'scm:git@github.com:signalapp/libsignal.git'
|
|
developerConnection = 'scm:git@github.com:signalapp/libsignal.git'
|
|
}
|
|
|
|
licenses {
|
|
license {
|
|
name = 'AGPLv3'
|
|
url = 'https://www.gnu.org/licenses/agpl-3.0.txt'
|
|
}
|
|
}
|
|
|
|
developers {
|
|
developer {
|
|
name = 'Signal Messenger LLC'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
signing {
|
|
required { isReleaseBuild() && gradle.taskGraph.hasTask(":server:publish") }
|
|
sign publishing.publications.mavenJava
|
|
}
|