Skip to content
Merged
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
53 changes: 53 additions & 0 deletions .github/workflows/auto_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

name: AutoBuild
#
# Constructed with help from:
# - https://blog.logrocket.com/android-ci-cd-using-github-actions/
# - https://www.droidcon.com/2022/01/05/getting-started-ci-cd-for-android-project-part-3-github-actions/
# - https://stackoverflow.com/questions/61335109/
# - https://github.com/actions/setup-java
# - https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
#
on:
release:
types: [created]
pull_request:
types: [opened, edited, reopened, synchronize]
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-24.04
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: gradle

- name: Build with Gradle
run: |
echo "Building Debug APK."
chmod +x gradlew
./gradlew build --no-daemon

- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- uses: actions/upload-artifact@v4
with:
name: Package
path: app/build/outputs/apk/release/app-release-unsigned.apk
14 changes: 9 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,16 @@ android {

compileOptions {
encoding "UTF-8"
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}

namespace 'com.easyfitness'
lint {

lintOptions {
abortOnError false
disable 'GoogleAppIndexingWarning'
baseline file("lint-baseline.xml")
}
}

Expand All @@ -86,8 +89,9 @@ dependencies {
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")

// Testing
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
testImplementation 'org.mockito:mockito-core:5.15.2'
testImplementation 'org.mockito:mockito-junit-jupiter:5.15.2'

// Other
implementation 'com.github.JDevZone:FillProgressLayout:0.0.8'
Expand Down
Loading