forked from openMF/mobile-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Gradle Error & Refactor Multiple Activity to Single Activity
- Loading branch information
Showing
154 changed files
with
2,195 additions
and
2,940 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,158 +1,101 @@ | ||
name: Mobile-Wallet CI[Master/Dev] | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'dev' | ||
- 'master' | ||
- 'payment_hub' | ||
branches: [ dev, master, payment_hub ] | ||
pull_request: | ||
|
||
concurrency: | ||
group: build-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build APK | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Set up JDK | ||
- name: Set Up JDK 17 | ||
uses: actions/setup-java@v1 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
- uses: gradle/actions/setup-gradle@v4 | ||
|
||
# Install NDK | ||
#- name: Install NDK | ||
# run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;20.0.5594570" --sdk_root=${ANDROID_SDK_ROOT} | ||
|
||
# Update Gradle Permission | ||
- name: Change gradlew Permission | ||
run: chmod +x gradlew | ||
|
||
# Turing off detekt check until migration finished | ||
# - name: Check Dependency Guard | ||
# id: dependencyguard_verify | ||
# continue-on-error: true | ||
# run: ./gradlew dependencyGuard | ||
# | ||
# - name: Prevent updating Dependency Guard baselines if this is a fork | ||
# id: checkfork_dependencyguard | ||
# continue-on-error: false | ||
# if: steps.dependencyguard_verify.outcome == 'failure' && github.event.pull_request.head.repo.full_name != github.repository | ||
# run: | | ||
# echo "::error::Dependency Guard failed, please update baselines with: ./gradlew dependencyGuardBaseline" && exit 1 | ||
|
||
# Build App | ||
- name: Build with Gradle | ||
run: ./gradlew assemble | ||
|
||
# Upload Built APK | ||
- name: Upload Build Artifacts | ||
uses: actions/[email protected] | ||
- name: Cache Gradle and build outputs | ||
uses: actions/cache@v4 | ||
with: | ||
name: mobile-wallet | ||
path: mifospay/build/outputs/apk/debug/ | ||
|
||
# Turing off detekt check until migration finished | ||
# lintCheck: | ||
# name: Static Analysis | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# | ||
# # Setup JDK 17 | ||
# - name: Setup JDK 17 | ||
# uses: actions/setup-java@v1 | ||
# with: | ||
# java-version: 17 | ||
# | ||
# - name: Detekt For All Modules | ||
# run: ./gradlew detekt | ||
|
||
pmd: | ||
name: PMD | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
build | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: ${{ runner.os }}-gradle- | ||
|
||
checks: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
check: [ build_logic, spotless, dependency_guard ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Setup JDK 17 | ||
- name: Setup JDK 17 | ||
uses: actions/setup-java@v1 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Run ${{ matrix.check }} | ||
run: | | ||
if [ "${{ matrix.check }}" = "build_logic" ]; then | ||
./gradlew check -p build-logic | ||
elif [ "${{ matrix.check }}" = "spotless" ]; then | ||
./gradlew spotlessCheck --no-configuration-cache --no-daemon | ||
elif [ "${{ matrix.check }}" = "dependency_guard" ]; then | ||
./gradlew dependencyGuard | ||
fi | ||
tests_and_lint: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: PMD Check[MifosPay] | ||
run: ./gradlew mifospay:pmd | ||
|
||
- name: Upload PMD Report[MifosPay] | ||
uses: actions/[email protected] | ||
if: failure() | ||
- uses: actions/setup-java@v4 | ||
with: | ||
name: PMD Report[MifosPay] | ||
path: mifospay/build/reports/ | ||
|
||
- name: PMD Check[Core:Datastore] | ||
run: ./gradlew core:datastore:pmd | ||
|
||
- name: PMD Check[Core:Data] | ||
run: ./gradlew core:data:pmd | ||
|
||
- name: PMD Check[Core:DesignSystem] | ||
run: ./gradlew core:designsystem:pmd | ||
|
||
- name: PMD Check[Core:Common] | ||
run: ./gradlew core:common:pmd | ||
|
||
- name: PMD Check[Core:Network] | ||
run: ./gradlew core:network:pmd | ||
|
||
- name: PMD Check[Core:Model] | ||
run: ./gradlew core:model:pmd | ||
|
||
- name: PMD Check[Feature:Auth] | ||
run: ./gradlew feature:auth:pmd | ||
distribution: 'zulu' | ||
java-version: 17 | ||
- name: Run tests and lint | ||
run: | | ||
./gradlew testDemoDebug detekt | ||
- name: Upload reports | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-and-lint-reports | ||
path: | | ||
**/build/reports/detekt/detekt.md | ||
**/build/test-results/test*UnitTest/**.xml | ||
checkstyle: | ||
name: Checkstyle | ||
build: | ||
needs: [ checks, tests_and_lint ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Setup JDK 17 | ||
- name: Setup JDK 17 | ||
uses: actions/setup-java@v1 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- uses: actions/checkout@v2 | ||
- name: Checkstyle[MifosPay] | ||
run: ./gradlew mifospay:checkstyle | ||
|
||
- name: Upload Checkstyle Report[MifosPay] | ||
uses: actions/[email protected] | ||
if: failure() | ||
with: | ||
name: Checkstyle Report[MifosPay] | ||
path: mifospay/build/reports/ | ||
|
||
- name: Static Analysis[Core:Datastore] | ||
run: ./gradlew core:datastore:checkstyle | ||
- name: Build APKs | ||
run: ./gradlew :app:assemble :benchmarks:assemble | ||
-x pixel6Api33ProdNonMinifiedReleaseAndroidTest | ||
-x pixel6Api33DemoNonMinifiedReleaseAndroidTest | ||
-x collectDemoNonMinifiedReleaseBaselineProfile | ||
-x collectProdNonMinifiedReleaseBaselineProfile | ||
|
||
- name: Static Analysis[Core:Data] | ||
run: ./gradlew core:data:checkstyle | ||
- name: Check badging | ||
run: ./gradlew :app:checkProdReleaseBadging | ||
|
||
- name: Static Analysis[Core:DesignSystem] | ||
run: ./gradlew core:designsystem:checkstyle | ||
|
||
- name: Static Analysis[Core:Common] | ||
run: ./gradlew core:common:checkstyle | ||
|
||
- name: Static Analysis[Core:Network] | ||
run: ./gradlew core:network:checkstyle | ||
|
||
- name: Static Analysis[Core:Model] | ||
run: ./gradlew core:model:checkstyle | ||
- name: Upload APKs | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: APKs | ||
path: '**/build/outputs/apk/**/*.apk' | ||
|
||
- name: Static Analysis[Feature:Auth] | ||
run: ./gradlew feature:auth:checkstyle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,6 @@ interface UserDataRepository { | |
* Stream of [UserData] | ||
*/ | ||
val userData: Flow<UserData> | ||
|
||
fun logOut(): Unit | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ plugins { | |
|
||
kotlin { | ||
jvm { | ||
jvmToolchain(17) | ||
jvmToolchain(21) | ||
withJava() | ||
} | ||
|
||
|
Oops, something went wrong.