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

Set up GitHub Actions and fix builds #243

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
- run: ./gradlew app:assembleDebug
9 changes: 6 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ android {
}
}

signingConfigs {
create("release") {
val releaseSigning = try {
signingConfigs.create("release") {
Comment on lines -35 to +36
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

val properties = Properties().apply {
load(project.rootProject.file("local.properties").inputStream())
}
Expand All @@ -42,13 +42,15 @@ android {
keyAlias = properties["key.alias"] as String
keyPassword = properties["key.password"] as String
}
} catch (_: Exception) {
signingConfigs["debug"]
}

buildTypes {
getByName("release") {
isMinifyEnabled = true
isShrinkResources = true
signingConfig = signingConfigs.getByName("release")
signingConfig = releaseSigning
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
Expand All @@ -58,6 +60,7 @@ android {
getByName("debug") {
versionNameSuffix = "-debug"
applicationIdSuffix = ".debug"
signingConfig = releaseSigning
isDebuggable = true
}

Expand Down