mirror of
https://github.com/signalapp/libsignal.git
synced 2026-05-11 09:26:20 +02:00
This can give better error messages for JNI mistakes that might otherwise crash or go unnoticed. Tested by introducing such a mistake. (Though it's hard to do with the jni crate's safe interfaces, which is a good thing!) The Android Emulator always has its equivalent checks on, so the Slow Tests are also giving us some confidence about our JNI usage.
99 lines
2.2 KiB
Groovy
99 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'
|
|
}
|
|
}
|
|
test {
|
|
java {
|
|
srcDir '../shared/test/java'
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation 'junit:junit:4.13'
|
|
}
|
|
|
|
test {
|
|
jvmArgs '-Xcheck:jni'
|
|
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'
|
|
}
|
|
|
|
// 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'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
setUpSigningKey(signing)
|
|
signing {
|
|
required { isReleaseBuild() && gradle.taskGraph.hasTask(":server:publish") }
|
|
sign publishing.publications.mavenJava
|
|
}
|