mirror of
https://gitlab.com/signald/libraries/libsignal-client.git
synced 2024-12-04 19:46:37 +00:00
151 lines
4.1 KiB
Diff
151 lines
4.1 KiB
Diff
From e87655f4171dbfb3ae9c733035d1570ccc514805 Mon Sep 17 00:00:00 2001
|
|
From: signald <nobody@signald.org>
|
|
Date: Tue, 26 Oct 2021 18:28:59 -0700
|
|
Subject: [PATCH] update gradle files
|
|
|
|
---
|
|
java/build.gradle | 7 ----
|
|
java/java/build.gradle | 85 +++++++++++-------------------------------
|
|
java/settings.gradle | 2 +-
|
|
3 files changed, 22 insertions(+), 72 deletions(-)
|
|
|
|
diff --git a/java/build.gradle b/java/build.gradle
|
|
index 8bf2a39..157de9f 100644
|
|
--- a/java/build.gradle
|
|
+++ b/java/build.gradle
|
|
@@ -42,10 +42,3 @@ task clean(type: Delete) {
|
|
}
|
|
}
|
|
clean.dependsOn(cargoClean)
|
|
-
|
|
-task makeAll() {
|
|
- group 'Rust'
|
|
- description 'Build the native libraries'
|
|
-
|
|
- dependsOn 'makeJniLibrariesDesktop', 'makeJniLibrariesAndroid'
|
|
-}
|
|
diff --git a/java/java/build.gradle b/java/java/build.gradle
|
|
index 2f31542..67c4df3 100644
|
|
--- a/java/java/build.gradle
|
|
+++ b/java/java/build.gradle
|
|
@@ -6,7 +6,7 @@ buildscript {
|
|
}
|
|
|
|
apply plugin: 'java'
|
|
-apply plugin: 'maven'
|
|
+apply plugin: 'maven-publish'
|
|
apply plugin: 'signing'
|
|
|
|
sourceCompatibility = 1.7
|
|
@@ -19,18 +19,6 @@ repositories {
|
|
mavenLocal()
|
|
}
|
|
|
|
-sourceSets {
|
|
- test {
|
|
- java {
|
|
- srcDirs = ['src/test/java/', project(':tests').file('src/test/java')]
|
|
- }
|
|
- }
|
|
-}
|
|
-
|
|
-dependencies {
|
|
- testCompile ('junit:junit:3.8.2')
|
|
-}
|
|
-
|
|
test {
|
|
testLogging {
|
|
events 'passed'
|
|
@@ -67,54 +55,6 @@ signing {
|
|
sign configurations.archives
|
|
}
|
|
|
|
-uploadArchives {
|
|
- configuration = configurations.archives
|
|
- repositories.mavenDeployer {
|
|
- beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
|
-
|
|
- repository(url: getReleaseRepositoryUrl()) {
|
|
- authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
|
|
- }
|
|
-
|
|
- pom.project {
|
|
- name 'signal-client-java'
|
|
- packaging 'jar'
|
|
- description 'Signal Protocol cryptography library for Java'
|
|
- url 'https://github.com/signalapp/libsignal-client'
|
|
-
|
|
- scm {
|
|
- url 'scm:git@github.com:signalapp/libsignal-client.git'
|
|
- connection 'scm:git@github.com:signalapp/libsignal-client.git'
|
|
- developerConnection 'scm:git@github.com:signalapp/libsignal-client.git'
|
|
- }
|
|
-
|
|
- licenses {
|
|
- license {
|
|
- name 'AGPLv3'
|
|
- url 'https://www.gnu.org/licenses/agpl-3.0.txt'
|
|
- distribution 'repo'
|
|
- }
|
|
- }
|
|
-
|
|
- developers {
|
|
- developer {
|
|
- name 'Signal Messenger LLC'
|
|
- }
|
|
- }
|
|
- }
|
|
- }
|
|
-}
|
|
-
|
|
-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'
|
|
@@ -133,6 +73,23 @@ artifacts {
|
|
archives packageSources
|
|
}
|
|
|
|
-tasks.withType(JavaCompile) {
|
|
- compileTask -> compileTask.dependsOn ':makeJniLibrariesDesktop'
|
|
-}
|
|
+publishing {
|
|
+ publications {
|
|
+ library(MavenPublication) {
|
|
+ from components.java
|
|
+ artifactId = archivesBaseName + "-" + System.getenv("TARGET")
|
|
+ }
|
|
+ }
|
|
+ repositories {
|
|
+ maven {
|
|
+ url System.getenv("CI_API_V4_URL") + "/projects/" + System.getenv("CI_PROJECT_ID") + "/packages/maven"
|
|
+ credentials(HttpHeaderCredentials) {
|
|
+ name = 'Job-Token'
|
|
+ value = System.getenv("CI_JOB_TOKEN")
|
|
+ }
|
|
+ authentication {
|
|
+ header(HttpHeaderAuthentication)
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+}
|
|
\ No newline at end of file
|
|
diff --git a/java/settings.gradle b/java/settings.gradle
|
|
index 7412250..4c0f3cd 100644
|
|
--- a/java/settings.gradle
|
|
+++ b/java/settings.gradle
|
|
@@ -1 +1 @@
|
|
-include ':java', ':android', ':tests'
|
|
+include ':java'
|
|
--
|
|
2.20.1
|
|
|