Skip to content

Commit 47a34d4

Browse files
authored
Merge pull request #29 from superus8r/develop
Prepare release 0.9.84274
2 parents c1cfcd4 + 9708dc8 commit 47a34d4

File tree

76 files changed

+3538
-927
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3538
-927
lines changed

.aiexclude

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
*.aab
5+
6+
# Files for the ART/Dalvik VM
7+
*.dex
8+
9+
# Java class files
10+
*.class
11+
12+
# Generated files
13+
bin/
14+
gen/
15+
out/
16+
# Uncomment the following line in case you need and you don't have the release build type files in your app
17+
# release/
18+
19+
# Gradle files
20+
.gradle/
21+
build/
22+
23+
# Local configuration file (sdk path, etc)
24+
local.properties
25+
26+
# Proguard folder generated by Eclipse
27+
proguard/
28+
29+
# Log Files
30+
*.log
31+
32+
# Android Studio Navigation editor temp files
33+
.navigation/
34+
35+
# Android Studio captures folder
36+
captures/
37+
38+
# IntelliJ
39+
*.iml
40+
.idea/*
41+
42+
# Keystore files
43+
# Uncomment the following lines if you do not want to check your keystore files in.
44+
#*.jks
45+
#*.keystore
46+
47+
# External native build folder generated in Android Studio 2.2 and later
48+
.externalNativeBuild
49+
50+
# Google Services (e.g. APIs or Firebase)
51+
# google-services.json
52+
53+
# Freeline
54+
freeline.py
55+
freeline/
56+
freeline_project_description.json
57+
58+
# fastlane
59+
fastlane/report.xml
60+
fastlane/Preview.html
61+
fastlane/screenshots
62+
fastlane/test_output
63+
fastlane/readme.md
64+
65+
# Version control
66+
vcs.xml
67+
68+
# lint
69+
lint/intermediates/
70+
lint/generated/
71+
lint/outputs/
72+
lint/tmp/
73+
# lint/reports/
74+
app/src/main/res/values/api_keys.xml
75+
.idea/compiler.xml
76+
.idea/compiler.xml
77+
.idea/compiler.xml
78+
.idea/jarRepositories.xml
79+
.idea/misc.xml
80+
app/build.gradle
81+
.idea/misc.xml
82+
.idea/misc.xml
83+
.idea/misc.xml
84+
.idea/misc.xml
85+
.idea/misc.xml
86+
.idea/.name
87+
.idea/codeStyles/Project.xml
88+
.idea/misc.xml
89+
.idea/misc.xml

.circleci/config.yml

Lines changed: 80 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,98 @@
11
version: 2.1
2+
orbs:
3+
codecov: codecov/[email protected]
4+
ruby: circleci/[email protected]
25

3-
jobs:
4-
android-test:
5-
macos:
6-
xcode: "11.2.0"
7-
working_directory: ~/repo/App
6+
commands:
7+
restore_gradle_cache:
88
steps:
9-
- checkout:
10-
path: ~/repo
11-
12-
- run:
13-
name: set ANDROID_SDK_ROOT
14-
command: |
15-
echo 'export ANDROID_SDK_ROOT=$HOME/android-tools' >> $BASH_ENV
16-
179
- restore_cache:
18-
key: android=tools-v1-{{ checksum "scripts/install-android-tools.sh" }}-{{ arch }}
19-
20-
- run:
21-
name: install android tools
22-
command: |
23-
sh scripts/install-android-tools.sh
24-
echo 'export PATH=$ANDROID_SDK_ROOT/tools/bin:$PATH' >> $BASH_ENV
25-
echo 'export PATH=$ANDROID_SDK_ROOT/tools:$PATH' >> $BASH_ENV
26-
echo 'export PATH=$ANDROID_SDK_ROOT/platform-tools:$PATH' >> $BASH_ENV
27-
echo 'export PATH=$ANDROID_SDK_ROOT/emulator:$PATH' >> $BASH_ENV
28-
source $BASH_ENV
29-
sdkmanager --list
10+
key: v1-gradle-wrapper-{{ arch }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
11+
- restore_cache:
12+
key: v1-gradle-cache-{{ arch }}-{{ checksum "build.gradle" }}
3013

14+
save_gradle_cache:
15+
steps:
3116
- save_cache:
32-
key: android=tools-v1-{{ checksum "scripts/install-android-tools.sh" }}-{{ arch }}
3317
paths:
34-
- /Users/distiller/android-tools
18+
- ~/.gradle/wrapper
19+
key: v1-gradle-wrapper-{{ arch }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
20+
- save_cache:
21+
paths:
22+
- ~/.gradle/caches
23+
key: v1-gradle-cache-{{ arch }}-{{ checksum "build.gradle" }}
3524

36-
- run:
37-
name: create AVD
38-
command: make create-avd
25+
executors:
26+
android-machine:
27+
machine:
28+
image: android:2024.01.1
29+
android-docker:
30+
docker:
31+
- image: cimg/android:2024.01
3932

33+
jobs:
34+
android-test:
35+
executor: android-machine
36+
resource_class: large
37+
steps:
38+
- checkout
39+
- restore_gradle_cache
40+
- ruby/install-deps:
41+
with-cache: true
4042
- run:
41-
name: start AVD
42-
command: emulator-headless -avd android-tablet
43-
background: true
44-
43+
name: Fastlane - run all tests with coverage report
44+
command: |
45+
bundle exec fastlane testDev
46+
- save_gradle_cache
4547
- run:
46-
name: wait for emulator
47-
command: adb wait-for-device shell 'while [[ -z $(getprop dev.bootcomplete) ]]; do sleep 1; done;'
48-
49-
- run: adb shell screencap -p > screenshots/before.png
48+
name: Analyze on SonarCloud
49+
command: ./gradlew lintDebug sonar
50+
- codecov/upload:
51+
file: app/build/mergedReportDir/jacocoTestReport/jacocoTestReport.xml
52+
- store_test_results:
53+
path: app/build/test-results/testDebugUnitTest
54+
- store_artifacts:
55+
path: app/build/mergedReportDir
5056

51-
# (insert testing here)
57+
distribute-dev:
58+
executor: android-docker
59+
resource_class: large
60+
steps:
61+
- checkout
62+
- restore_gradle_cache
63+
- run:
64+
name: Prepare Fastlane
65+
command: sudo bundle update
66+
- run:
67+
name: Distribute to Firebase AppTester Dev
68+
command: bundle exec fastlane distDev
69+
- store_artifacts:
70+
path: /home/circleci/project/app/build/outputs/apk/debug/app-debug.apk
71+
destination: fastlane-output-debug
5272

73+
distribute-internal-testing:
74+
executor: android-docker
75+
resource_class: large
76+
steps:
77+
- checkout
78+
- restore_gradle_cache
79+
- run:
80+
name: Prepare Fastlane
81+
command: sudo bundle update
82+
- run:
83+
name: Distribute to Google PlayStore Internal Testing
84+
command: bundle exec fastlane deploy
85+
- run:
86+
name: Distribute to Firebase AppTester Prod
87+
command: bundle exec fastlane distProd
5388
- store_artifacts:
54-
path: screenshots
89+
path: /home/circleci/project/app/build/outputs/bundle/release/app-release.aab
90+
destination: fastlane-output-release
5591

5692
workflows:
5793
workflow:
5894
jobs:
59-
- android-test
95+
- android-test:
96+
context: SonarCloud
97+
- distribute-dev
98+
- distribute-internal-testing

.github/workflows/android.yml

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,96 @@
11
name: Android CI
22

3-
on: [push]
3+
on: [ push ]
44

55
jobs:
66

77
unit-test:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
11-
- uses: ruby/setup-ruby@v1
12-
with:
13-
ruby-version: '3.0'
14-
bundler-cache: true
15-
16-
- name: set up JDK 11
17-
uses: actions/setup-java@v1
18-
with:
19-
distribution: 'zulu'
20-
java-version: '11'
21-
- name: set up Python
22-
uses: actions/setup-python@v4
23-
with:
24-
python-version: '3.10'
25-
- name: generate ksProp file
26-
run: python scripts/generateKsPropFile.py
27-
- name: create google-services.json file
28-
run: cat app/google-services.json | base64
29-
- name: update google-services.json file
30-
env:
31-
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }}
32-
run: echo $DATA > app/google-services.json
33-
- name: setup fastlane
34-
run: bundle install
35-
- name: run unit tests
36-
run: bundle exec fastlane android run_unit_tests
37-
- name: Unit tests results
38-
uses: actions/upload-artifact@v1
39-
with:
40-
name: unit-test-results
41-
path: app/build/reports/tests/testDebugUnitTest/index.html
10+
- uses: actions/checkout@v3
11+
- uses: ruby/setup-ruby@v1
12+
with:
13+
ruby-version: '3.1'
14+
bundler-cache: true
15+
- name: set up JDK 17
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: 'zulu'
19+
java-version: '17'
20+
- name: Cache Gradle wrapper
21+
uses: actions/cache@v3
22+
with:
23+
path: ~/.gradle/wrapper
24+
key: ${{ runner.OS }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
25+
restore-keys: |
26+
${{ runner.OS }}-gradle-wrapper-cache-
27+
- name: Cache Gradle caches
28+
uses: actions/cache@v3
29+
with:
30+
path: ~/.gradle/caches
31+
key: ${{ runner.OS }}-gradle-caches-cache-${{ hashFiles('build.gradle') }}
32+
restore-keys: |
33+
${{ runner.OS }}-gradle-caches-cache-
34+
- name: generate ksProp file
35+
run: ./gradlew generateKsPropFile
36+
- name: generate google-services.json file
37+
run: ./gradlew generateGoogleServicesJson
38+
env:
39+
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
40+
- name: setup fastlane
41+
run: bundle install
42+
- name: run unit tests
43+
run: bundle exec fastlane android run_unit_tests
44+
- name: Unit tests results
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: unit-test-results
48+
path: app/build/reports/tests/testDebugUnitTest/index.html
4249

4350
lint:
4451
runs-on: ubuntu-latest
4552
steps:
4653
- uses: actions/checkout@v1
47-
- name: set up JDK 11
54+
- name: set up JDK 17
4855
uses: actions/setup-java@v1
4956
with:
5057
distribution: 'zulu'
51-
java-version: '11'
52-
- name: set up Python
53-
uses: actions/setup-python@v4
54-
with:
55-
python-version: '3.10'
58+
java-version: '17'
5659
- name: generate ksProp file
57-
run: python scripts/generateKsPropFile.py
58-
- name: create google-services.json file
59-
run: cat app/google-services.json | base64
60-
- name: update google-services.json file
60+
run: ./gradlew generateKsPropFile
61+
- name: generate google-services.json file
62+
run: ./gradlew generateGoogleServicesJson
6163
env:
62-
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }}
63-
run: echo $DATA > app/google-services.json
64+
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
6465
- name: Lint
6566
run: bash ./gradlew lintDebug
6667
- name: Lint results
67-
uses: actions/upload-artifact@v1
68+
uses: actions/upload-artifact@v4
6869
with:
6970
name: app
7071
path: app/build/reports/lint-results-debug.html
7172

7273
ui-test:
73-
runs-on: macOS-latest
74+
runs-on: ubuntu-latest
7475
steps:
7576
- name: checkout
7677
uses: actions/checkout@v2
77-
- name: set up JDK 11
78-
uses: actions/setup-java@v1
78+
- name: set up JDK 17
79+
uses: actions/setup-java@v4
7980
with:
8081
distribution: 'zulu'
81-
java-version: '11'
82-
- name: set up Python
83-
uses: actions/setup-python@v4
84-
with:
85-
python-version: '3.10'
82+
java-version: '17'
8683
- name: generate ksProp file
87-
run: python scripts/generateKsPropFile.py
88-
- name: create google-services.json file
89-
run: cat app/google-services.json | base64
90-
- name: update google-services.json file
84+
run: ./gradlew generateKsPropFile
85+
- name: generate google-services.json file
86+
run: ./gradlew generateGoogleServicesJson
9187
env:
92-
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }}
93-
run: echo $DATA > app/google-services.json
88+
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
89+
- name: Enable KVM group perms
90+
run: |
91+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
92+
sudo udevadm control --reload-rules
93+
sudo udevadm trigger --name-match=kvm
9494
- name: run tests
9595
uses: reactivecircus/android-emulator-runner@v2
9696
with:

0 commit comments

Comments
 (0)