Skip to content

Commit

Permalink
feat: prepare for fdroid release
Browse files Browse the repository at this point in the history
  • Loading branch information
joelkoen committed Jun 5, 2024
1 parent cdce12d commit 6dd3bdb
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: ./gradlew --no-daemon build
- run: ./gradlew --no-daemon assembleDebug
env:
TERM: dumb
JAVA_OPTS: -Xmx2048m
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# SPDX-FileCopyrightText: 2024, Joel Koen
# SPDX-License-Identifier: CC0-1.0

name: Build release
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
echo "$SIGNING_KEYSTORE" | base64 -d > release.jks
./gradlew --no-daemon assembleRelease
env:
SIGNING_KEYSTORE: ${{ secrets.SIGNING_KEYSTORE }}
SIGNING_KEYSTORE_PASSWORD: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
SIGNING_ALIAS: ${{ secrets.SIGNING_ALIAS }}
SIGNING_ALIAS_PASSWORD: ${{ secrets.SIGNING_ALIAS_PASSWORD }}
- uses: actions/upload-artifact@v4
with:
name: release-apk
path: build/outputs/apk/release/beacondb-unifiednlp-release.apk
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ user.gradle
local.properties
.idea/
BuildConfig.java
release/
release.jks
8 changes: 6 additions & 2 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

Files: src/main/res/mipmap-*/*.png
Copyright: 2024 beaconDB
Copyright: 2024 Joel Koen
License: CC-BY-3.0

Files: src/main/ic_launcher-playstore.png
Copyright: 2024 beaconDB
Copyright: 2024 Joel Koen
License: CC-BY-3.0

FIles: fastlane/metadata/**/*.txt
Copyright: 2024 Joel Koen
License: CC0-1.0
24 changes: 20 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ buildscript {
}

/* This is a hack, trying to provide release updates to F-Droid until it can properly handle Gradle
applicationId "org.microg.nlp.backend.ichnaea"
versionName "1.5.0"
versionCode "20036"
applicationId "net.beacondb.unifiednlp"
versionName "1.7.0"
versionCode "20048"
*/

apply plugin: 'com.android.application'

String getMyVersionName() {
def stdout = new ByteArrayOutputStream()
if (rootProject.file("gradlew").exists())
exec { commandLine 'git', 'describe', '--tags', '--always', '--dirty'; standardOutput = stdout }
exec { commandLine 'git', 'describe', '--tags', '--always', '--dirty'
standardOutput = stdout }
else // automatic build system, don't tag dirty
exec { commandLine 'git', 'describe', '--tags', '--always'; standardOutput = stdout }
return stdout.toString().trim().substring(1)
Expand Down Expand Up @@ -63,6 +64,21 @@ android {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

signingConfigs {
release {
storeFile file("release.jks")
storePassword System.getenv("SIGNING_KEYSTORE_PASSWORD")
keyAlias System.getenv("SIGNING_ALIAS")
keyPassword System.getenv("SIGNING_ALIAS_PASSWORD")
}
}

buildTypes {
release {
signingConfig signingConfigs.release
}
}
}

if (file('user.gradle').exists()) {
Expand Down
3 changes: 3 additions & 0 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a href="https://f-droid.org/packages/com.google.android.gms">UnifiedNLP</a>
backend that uses <a href="https://beacondb.net/">beaconDB</a> to resolve
locations. The backend can also be configured to use a custom Ichnaea endpoint.
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/short_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UnifiedNLP backend for beaconDB
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/title.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
beaconDB UnifiedNlp Backend

0 comments on commit 6dd3bdb

Please sign in to comment.