Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Gradle #452

Merged
merged 50 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
9a0ba70
Use Gradle
Aug 26, 2023
428d601
Added missing Gradle file
Aug 26, 2023
8a01ad1
Implemented translation synchronization script into Gradle
Aug 26, 2023
33aa5dc
Fixed custom font can't be loaded
Aug 26, 2023
437ede1
Don't use deprecated Gradle features
Aug 26, 2023
75d4f48
Remove packingOptions
Aug 26, 2023
3f27297
Remove Kotlin and AndroidX
Aug 27, 2023
c71b38a
Add default proguard config file
Aug 27, 2023
31889a3
Set minimum API level to 4
Aug 27, 2023
02ffb58
Update CI scripts
Aug 27, 2023
101f964
Remove old Makefile
Aug 27, 2023
eae3dbc
Merge remote-tracking branch 'Julow/master'
Aug 27, 2023
ba77fec
Allow specifying manual keystores for local build and CI
Aug 28, 2023
110da27
Fixed check_layout.py
Aug 28, 2023
2e60c69
Include special_font.ttf and don't automatically rebuild it all the time
Aug 28, 2023
bd12384
Merge .gitignore files
Aug 28, 2023
1ce0ff8
Be compatible with Java 7
Aug 28, 2023
7e8a417
Remove empty proguard configuration file
Aug 28, 2023
a4e17df
Don't print fake values when checking keyboard layouts
Aug 28, 2023
95692b9
Updated documentation
Aug 28, 2023
7319728
Remove automatic release singing in GitHub CI
Aug 29, 2023
b1a8fd4
Rename and reorganize Gradle build tasks
Aug 29, 2023
13c3658
Don't split translations between debug and release
Aug 29, 2023
9c1709c
Fix CI fail
Aug 29, 2023
44ea2ce
Update documentation
Aug 29, 2023
2f767ea
Run gradle layout tasks at test
Aug 31, 2023
e3599f3
Don't use Gradle submodule
Sep 3, 2023
fc7b76b
Remove Gradle submodule from documentation
Sep 3, 2023
02a273e
Removed reference to Gradle submodule
Sep 3, 2023
9556017
Revert changing CI name
Sep 4, 2023
adcef59
Remove reference to app directory
Sep 4, 2023
93f153d
Updated .gitignore
Sep 4, 2023
7a3089a
Update layouts.xml
Sep 4, 2023
d1ef52f
Cleanup gradle.properties
Sep 4, 2023
2efe490
Remove need for separate debug sourceSet
Sep 5, 2023
27bfee0
Don't print if no debug keystore needs to be initialized
Sep 5, 2023
8378e7c
Remove debug sourceSet and use old layout for main sourceSet
Sep 5, 2023
00784cc
Remove Jitpack dependency
Oct 10, 2023
5a5705c
More verbose error message in documentation
Oct 10, 2023
d3bcf25
Update build.gradle
Oct 10, 2023
b53e764
Add syncTranslations to Gradle test task
Oct 10, 2023
61fe67e
Don't redirect Gradle task output to stdout except for checkKeyboardL…
Oct 10, 2023
4c75d70
Merge branch 'MAIN' into pr/452
Julow Nov 25, 2023
64db698
Unindent workflow files
Julow Nov 25, 2023
6808a02
Update contribution guidelines
Julow Nov 25, 2023
d68cd86
2-based indentation
Julow Nov 25, 2023
c10c75c
CI: Restore make-apk name
Julow Nov 25, 2023
e3a813d
Tidy .gitignore
Julow Nov 25, 2023
67c49b2
Move special_font source back to srcs/
Julow Nov 25, 2023
2444731
Merge branch 'MAIN' into pr/452
Julow Nov 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/check-layouts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ jobs:
check-layouts:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- run: python3 gen_layouts.py
- name: Check that the generated layouts.xml is uptodate, run python3 gen_layouts.py otherwise
run: git diff --exit-code
- name: Checkout repo
deftkHD marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/checkout@v3
- working-directory: ./app
run: python3 gen_layouts.py
- name: Check that the generated layouts.xml is uptodate, run python3 gen_layouts.py otherwise
run: git diff --exit-code
11 changes: 6 additions & 5 deletions .github/workflows/check-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ jobs:
check-translations:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- run: python3 sync_translations.py
- name: Check that strings files are uptodate, run python3 sync_translations.py otherwise
run: git diff --exit-code
- name: Checkout repo
uses: actions/checkout@v3
- working-directory: ./app
run: python3 sync_translations.py
- name: Check that strings files are uptodate, run python3 sync_translations.py otherwise
run: git diff --exit-code
117 changes: 79 additions & 38 deletions .github/workflows/make-apk.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,88 @@
name: Make Apk CI
name: Make APKs CI
deftkHD marked this conversation as resolved.
Show resolved Hide resolved

on:
workflow_dispatch:
push:
pull_request:

jobs:
Build-Apk:
Build-Apks:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '11'
- name: Checkout repo
uses: actions/checkout@v3
- name: Cache debug certificate
uses: actions/cache@v3
with:
path: _build/debug.keystore
key: debug-keystore
- name: Restore debug keystore from github Secrets
run: |
mkdir -p _build
cd "_build"
# Check if exist and use the secret named DEBUG_KEYSTORE
# The contents of the secret can be obtained -
# from the debug.keystore.asc from you local _build folder
if [[ ! "${{ secrets.DEBUG_KEYSTORE }}" = "" ]]; then
echo "${{ secrets.DEBUG_KEYSTORE }}" > "debug.keystore.asc"
if [[ -s "debug.keystore.asc" ]]; then
gpg -d --passphrase "debug0" --batch "debug.keystore.asc" > "debug.keystore"
fi
fi
- name: Build
run: make
- name: Artifact naming
run: |
artifact="${{github.repository_owner}} ${{github.ref_name}}"
artifact="${artifact//\//-}" # replace slashes
echo "artifact=${artifact}" >> $GITHUB_ENV
- name: Save debug apk
uses: actions/upload-artifact@v3
with:
name: "${{env.artifact}} debug_apk"
path: _build/*.apk
- uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
- name: Checkout repo
uses: actions/checkout@v3
- name: Install FontForge
run: |
sudo apt-get update
sudo apt-get -y install fontforge
- name: Restore debug keystore from GitHub Secrets
run: |
# Check if exist and use the secret named DEBUG_KEYSTORE
# The contents of the secret can be obtained -
# from the debug.keystore.asc from you local folder (refer to CONTRIBUTING.md#Using the local debug.keystore on the Github CI actions)
if [[ ! "${{ secrets.DEBUG_KEYSTORE }}" = "" ]]; then
echo "${{ secrets.DEBUG_KEYSTORE }}" > "debug.keystore.asc"
if [[ -s "debug.keystore.asc" ]]; then
echo "Restoring debug keystore from GitHub secrets"
gpg -d --passphrase "debug0" --batch "debug.keystore.asc" > "debug.keystore"
fi
fi
- name: Restore release keystore from GitHub Secrets
env:
RELEASE_KEYSTORE_RAW: ${{ secrets.RELEASE_KEYSTORE }} # Used for condition
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
if: env.RELEASE_KEYSTORE_RAW != ''
run: |
# Check if exist and use the secret named RELEASE_KEYSTORE
# The contents of the secret can be obtained -
# from the release.keystore.asc from you local folder
if [[ ! "${{ secrets.RELEASE_KEYSTORE }}" = "" ]]; then
echo "${{ secrets.RELEASE_KEYSTORE }}" > "release.keystore.asc"
if [[ -s "release.keystore.asc" ]]; then
echo "Restoring release keystore from GitHub secrets"
# Passing secrets as arguments is not recommended since they could be observed by using 'ps'
gpg -d --passphrase "$RELEASE_KEYSTORE_PASSWORD" --batch "release.keystore.asc" > "release.keystore"
fi
fi
- name: Build debug APK
uses: gradle/gradle-build-action@v2
env:
DEBUG_KEYSTORE: "../debug.keystore"
DEBUG_KEYSTORE_PASSWORD: debug0
DEBUG_KEY_ALIAS: debug
DEBUG_KEY_PASSWORD: debug0
with:
arguments: assembleDebug
- name: Build signed release APK
env:
RELEASE_KEYSTORE_RAW: ${{ secrets.RELEASE_KEYSTORE }} # Used for condition
RELEASE_KEYSTORE: "../release.keystore"
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
if: ${{ env.RELEASE_KEYSTORE_RAW != '' }}
uses: gradle/gradle-build-action@v2
with:
arguments: assembleRelease
- name: Artifact naming
run: |
artifact="${{github.repository_owner}} ${{github.ref_name}}"
artifact="${artifact//\//-}" # replace slashes
echo "artifact=${artifact}" >> $GITHUB_ENV
- name: Upload debug APK
uses: actions/upload-artifact@v3
with:
name: "${{env.artifact}} debug_apk"
path: app/build/outputs/apk/debug/*.apk
- name: Upload signed release APK
env:
RELEASE_KEYSTORE_RAW: ${{ secrets.RELEASE_KEYSTORE }} # Used for condition
if: ${{ env.RELEASE_KEYSTORE_RAW != '' }}
uses: actions/upload-artifact@v3
with:
name: "${{env.artifact}} signed_release_apk"
path: app/build/outputs/apk/release/*.apk
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,19 @@
*.keystore.asc
_build
/*-keystore.conf
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
deftkHD marked this conversation as resolved.
Show resolved Hide resolved

3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

139 changes: 0 additions & 139 deletions Makefile

This file was deleted.

Loading