Skip to content

Commit

Permalink
build adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
tiainen committed Nov 23, 2023
1 parent c2aaad0 commit 394a109
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/jni_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ jobs:
- run: rustup target add ${{ matrix.additional-rust-target }}
if: ${{ matrix.additional-rust-target != '' }}

- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}

# install nasm compiler for boring
- name: Install nasm
if: startsWith(matrix.os, 'windows')
Expand All @@ -52,12 +58,6 @@ jobs:
run: java/build_jni.sh desktop
shell: bash

- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build for alternate target (arm64)
run: java/build_jni.sh desktop
if: matrix.os == 'macos-latest'
Expand Down Expand Up @@ -107,6 +107,12 @@ jobs:
- name: Copy libraries
run: mv ${{ steps.download.outputs.download-path }}/*/* java/shared/resources && find java/shared/resources

- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- run: make
if: ${{ inputs.dry_run }}
working-directory: java
Expand Down
4 changes: 2 additions & 2 deletions java/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ java_build: DOCKER_EXTRA=$(shell [ -L build ] && P=$$(readlink build) && echo -v
java_build: docker_image
$(DOCKER) run $(DOCKER_TTY_FLAG) --init --rm --user $$(id -u):$$(id -g) \
-v `cd .. && pwd`/:/home/libsignal/src $(DOCKER_EXTRA) $(DOCKER_IMAGE) \
sh -c "cd src/java; ./gradlew build"
sh -c "cd src/java; ./gradlew build -PskipAndroid"

java_test: java_build
$(DOCKER) run $(DOCKER_TTY_FLAG) --init --rm --user $$(id -u):$$(id -g) \
Expand All @@ -36,7 +36,7 @@ publish_java: docker_image
-e ORG_GRADLE_PROJECT_signingPassword \
-e ORG_GRADLE_PROJECT_signingKey \
$(DOCKER_IMAGE) \
sh -c "cd src/java; ./gradlew publish closeSonatypeStagingRepository"
sh -c "cd src/java; ./gradlew publish -PskipSigning closeSonatypeStagingRepository"

# We could run these through Docker, but they would have the same result anyway.

Expand Down
3 changes: 2 additions & 1 deletion java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ ext.setUpSigningKey = { signingExt ->

nexusPublishing {
repositories {
sonatype {
gluonNexus {
nexusUrl = uri(project.findProperty('sonatypeRepo') ?: "https://oss.sonatype.org/service/local/staging/deploy/maven2/")
username = project.findProperty('sonatypeUsername') ?: ""
password = project.findProperty('sonatypePassword') ?: ""
}
Expand Down

0 comments on commit 394a109

Please sign in to comment.