Initial commit

This commit is contained in:
finn 2021-10-26 18:01:41 -07:00
commit b59336d7e4
2 changed files with 190 additions and 0 deletions

42
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,42 @@
stages:
- build
variables:
version: "v2.15.3_unofficial_31"
GRADLE_OPTS: -Dorg.gradle.daemon=false
.multitarget:
parallel:
matrix:
- TARGET:
- aarch64-unknown-linux-gnu
- arm-unknown-linux-gnueabi
- arm-unknown-linux-gnueabihf
- armv7-unknown-linux-gnueabihf
- x86_64-unknown-linux-gnu
build:
extends: .multitarget
image: gradle:7
stage: build
script:
- git clone https://github.com/Turasa/libsignal-service-java
- cd libsignal-service-java && git checkout "$version"
- git config user.email nobody@signald.org && git config user.name signald
- git am ../libsignal-service-java.patch
- cd service
- gradle assemble publish
build x86_64-apple-darwin:
image: gradle:7
stage: build
tags: [darwin-builder]
script:
- git clone https://github.com/Turasa/libsignal-service-java
- cd libsignal-service-java && git checkout "$version"
- git config user.email nobody@signald.org && git config user.name signald
- git am ../libsignal-service-java.patch
- cd service
- gradle assemble publish
variables:
TARGET: x86_64-apple-darwin

View file

@ -0,0 +1,148 @@
From 57b26f24f4f2c9bacf086ad1aad452afb28d5c73 Mon Sep 17 00:00:00 2001
From: signald <nobody@signald.org>
Date: Sun, 24 Oct 2021 16:47:36 -0700
Subject: [PATCH] update gradle configuration
---
build.gradle | 1 -
dependencies.gradle | 4 +--
service/build.gradle | 60 +++++++++-----------------------------------
settings.gradle | 2 --
4 files changed, 14 insertions(+), 53 deletions(-)
diff --git a/build.gradle b/build.gradle
index 9e69283..b8c3b8c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,7 +4,6 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.17'
}
}
diff --git a/dependencies.gradle b/dependencies.gradle
index 0fd41a7..5b8805c 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -9,9 +9,9 @@ dependencyResolutionManagement {
alias('google-libphonenumber').to('com.googlecode.libphonenumber:libphonenumber:8.12.17')
// 1st Party
- alias('signal-client-java').to('org.whispersystems', 'signal-client-java').versionRef('signal-client')
+ alias('signal-client-java').to('org.whispersystems', 'signal-client-java-' + System.getenv("TARGET")).versionRef('signal-client')
alias('signal-client-android').to('org.whispersystems', 'signal-client-android').versionRef('signal-client')
- alias('signal-zkgroup-java').to('org.signal', 'zkgroup-java').versionRef('zkgroup')
+ alias('signal-zkgroup-java').to('org.signal', 'zkgroup-java-' + System.getenv("TARGET")).versionRef('zkgroup')
alias('signal-zkgroup-android').to('org.signal', 'zkgroup-android').versionRef('zkgroup')
// Third Party
diff --git a/service/build.gradle b/service/build.gradle
index 5222870..9ce10be 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -2,9 +2,9 @@ apply plugin: 'java-library'
apply plugin: 'java-test-fixtures'
apply plugin: 'com.google.protobuf'
apply plugin: 'maven-publish'
-apply plugin: 'signing'
apply plugin: 'witness'
apply plugin: 'idea'
+apply plugin: 'maven-publish'
apply from: 'witness-verifications.gradle'
sourceCompatibility = 1.8
@@ -23,6 +23,7 @@ compileJava {
}
repositories {
+ maven {url "https://gitlab.com/api/v4/groups/6853927/-/packages/maven"} // https://gitlab.com/groups/signald/-/packages
mavenCentral()
mavenLocal()
}
@@ -104,58 +105,21 @@ def getRepositoryPassword() {
publishing {
publications {
- mavenJava(MavenPublication) {
- artifactId = 'signal-service-java'
+ library(MavenPublication) {
from components.java
-
- pom {
- name = 'signal-service-java'
- packaging = 'jar'
- description = 'Signal Service communication library for Java, unofficial fork'
- url = 'https://github.com/Turasa/libsignal-service-java'
-
- scm {
- url = 'scm:git@github.com:Turasa/libsignal-service-java.git'
- connection = 'scm:git@github.com:Turasa/libsignal-service-java.git'
- developerConnection = 'scm:git@github.com:Turasa/libsignal-service-java.git'
- }
-
- licenses {
- license {
- name = 'GPLv3'
- url = 'https://www.gnu.org/licenses/gpl-3.0.txt'
- distribution = 'repo'
- }
- }
-
- developers {
- developer {
- name = 'Moxie Marlinspike'
- }
- developer {
- name = 'Sebastian Scheibner'
- }
- developer {
- name = 'Tilman Hoffbauer'
- }
- }
- }
-
+ artifactId = archivesBaseName + "-" + System.getenv("TARGET")
}
}
-
repositories {
maven {
- url = getReleaseRepositoryUrl()
- credentials {
- username getRepositoryUsername()
- password getRepositoryPassword()
+ 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)
}
}
}
-}
-
-signing {
- required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
- sign publishing.publications.mavenJava
-}
+}
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index 8861c00..4048aab 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,7 +1,5 @@
enableFeaturePreview('VERSION_CATALOGS')
-include ':android'
-
include 'libsignal-service'
project(':libsignal-service').projectDir = file('service')
--
2.20.1