Skip to content

Commit a4bedce

Browse files
authored
Merge pull request #38 from diyaps/cherrypick4
Update to 3.3.0
2 parents 672e9fb + 38479c1 commit a4bedce

File tree

5,311 files changed

+197677
-90205
lines changed

Some content is hidden

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

5,311 files changed

+197677
-90205
lines changed

.circleci/config.yml

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,58 @@ version: 2.1
44

55
# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
66
orbs:
7-
android: circleci/android@2.3.0
7+
android: circleci/android@2.4.0
88
codecov: codecov/codecov@3.3.0
99

1010
jobs:
1111
# Below is the definition of your job to build and test your app, you can rename and customize it as you want.
1212
build-and-test:
13-
# These next lines define the Android machine image executor: https://circleci.com/docs/2.0/executor-types/
14-
executor:
15-
name: android/android-machine
16-
resource-class: large
17-
tag: 2023.11.1
13+
machine: true
14+
resource_class: nightscout/android
1815

1916
steps:
2017
- checkout
2118

22-
- android/change-java-version:
23-
java-version: 17
19+
- run:
20+
name: Create avd
21+
command: |
22+
echo "no" | /opt/android-sdk/cmdline-tools/latest/bin/avdmanager --verbose create avd -n citest -k "system-images;android-30;google_apis_playstore;x86" --force
2423
25-
- android/start-emulator-and-run-tests:
26-
system-image: system-images;android-29;google_apis;x86
27-
# Compile while the emulator starts to use the time.
28-
post-emulator-launch-assemble-command: ./gradlew compileFullDebugUnitTestSources compileFullDebugAndroidTestSources
29-
test-command: ./gradlew connectedFullDebugAndroidTest
24+
- run:
25+
name: Launch emulator
26+
command: |
27+
export ANDROID_SDK_ROOT=/opt/android-sdk
28+
export ANDROID_HOME=/opt/android-sdk
29+
emulator -avd citest -delay-adb -verbose -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
30+
background: true
3031

31-
- android/run-tests:
32-
test-command: ./gradlew testFullDebugUnitTest
32+
- run:
33+
name: Run connectedFullDebugAndroidTest
34+
command: |
35+
export ANDROID_SDK_ROOT=/opt/android-sdk
36+
export ANDROID_HOME=/opt/android-sdk
37+
env
38+
./gradlew -Dorg.gradle.jvmargs=-Xmx6g connectedFullDebugAndroidTest
39+
40+
- run:
41+
name: Kill emulators
42+
command: |
43+
echo "Killing emulators"
44+
adb devices | grep emulator | cut -f1 | while read -r line; do adb -s $line emu kill; done
45+
46+
- run:
47+
name: Run testFullDebugUnitTest
48+
command: |
49+
export ANDROID_SDK_ROOT=/opt/android-sdk
50+
export ANDROID_HOME=/opt/android-sdk
51+
./gradlew -Dorg.gradle.jvmargs=-Xmx6g testFullDebugUnitTest
3352
34-
- android/run-tests:
35-
test-command: ./gradlew --stacktrace jacocoAllDebugReport
53+
- run:
54+
run: Run jacocoAllDebugReport
55+
command: |
56+
export ANDROID_SDK_ROOT=/opt/android-sdk
57+
export ANDROID_HOME=/opt/android-sdk
58+
./gradlew --stacktrace jacocoAllDebugReport
3659
3760
- run:
3861
name: Save test results

.circleci/config.yml.cloud

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Use the latest 2.1 version of CircleCI pipeline process engine.
2+
# See: https://circleci.com/docs/2.0/configuration-reference
3+
version: 2.1
4+
5+
# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
6+
orbs:
7+
android: circleci/android@2.3.0
8+
codecov: codecov/codecov@3.3.0
9+
10+
jobs:
11+
# Below is the definition of your job to build and test your app, you can rename and customize it as you want.
12+
build-and-test:
13+
# These next lines define the Android machine image executor: https://circleci.com/docs/2.0/executor-types/
14+
executor:
15+
name: android/android-machine
16+
resource-class: large
17+
tag: 2023.11.1
18+
19+
steps:
20+
- checkout
21+
22+
- android/change-java-version:
23+
java-version: 17
24+
25+
- android/start-emulator-and-run-tests:
26+
system-image: system-images;android-29;google_apis;x86
27+
# Compile while the emulator starts to use the time.
28+
post-emulator-launch-assemble-command: ./gradlew compileFullDebugUnitTestSources compileFullDebugAndroidTestSources
29+
test-command: ./gradlew connectedFullDebugAndroidTest
30+
31+
- android/run-tests:
32+
test-command: ./gradlew testFullDebugUnitTest
33+
34+
- android/run-tests:
35+
test-command: ./gradlew --stacktrace jacocoAllDebugReport
36+
37+
- run:
38+
name: Save test results
39+
command: |
40+
mkdir -p ~/test-results/junit/
41+
find . -type f -regex ".*/build/outputs/androidTest-results/.*xml" -exec cp {} ~/test-results/junit/ \;
42+
when: always
43+
44+
- store_test_results:
45+
path: ~/test-results
46+
47+
- store_artifacts:
48+
path: ~/test-results/junit
49+
50+
- codecov/upload:
51+
file: './build/reports/jacoco/jacocoAllDebugReport/jacocoAllDebugReport.xml'
52+
53+
workflows:
54+
# Below is the definition of your workflow.
55+
# Inside the workflow, you provide the jobs you want to run, e.g this workflow runs the build-and-test job above.
56+
# CircleCI will run this workflow on every commit.
57+
# For more details on extending your workflow, see the configuration docs: https://circleci.com/docs/2.0/configuration-reference/#workflows
58+
dotests:
59+
jobs:
60+
- build-and-test

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ Reporting bugs
1515
upper-right corner).
1616
- Obtain the app's log files, which can be found on the phone in
1717
_/storage/emulated/0/Android/data/info.nightscout.androidaps/_
18-
See https://wiki.aaps.app/en/latest/Usage/Accessing-logfiles.html
18+
See https://wiki.aaps.app/en/latest/GettingHelp/AccessingLogFiles.html
1919
- Open an issue at https://github.com/nightscout/AndroidAPS/issues/new

.github/workflows/android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v3
16-
- name: set up JDK 17
16+
- name: set up JDK 21
1717
uses: actions/setup-java@v3
1818
with:
19-
java-version: '17'
19+
java-version: '21'
2020
distribution: 'temurin'
2121
cache: gradle
2222

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/output-metadata.json
77
/build
88
/captures
9+
/java_pid*
910
*.apk
1011
build/
1112
!.idea/dictionaries/project-dictionary.xml
@@ -26,3 +27,6 @@ app/pumpcontrol/*
2627
wear/aapsclient/*
2728
wear/aapsclient2/*
2829
wear/pumpcontrol/*
30+
.kotlin/*
31+
/*.log
32+
*.preferences_pb

.idea/codeStyles/Project.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/dictionaries/project_dictionary.xml

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
kotlin version: 2.0.21
2+
error message: The daemon has terminated unexpectedly on startup attempt #1 with error code: 0. The daemon process output:
3+
1. Kotlin compile daemon is ready
4+

CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
This document speciffy hints and good practices for source code contributions.
1+
This document specify hints and good practices for source code contributions.
22

33
AndroidAPS is community effort and all contributions are welcome! If you wish help us improving AAPS - please read and try to adhere to
4-
this guidelines, to make the development and process of change aproval as smooth as possible :)
4+
this guidelines, to make the development and process of change approval as smooth as possible :)
55

66
General rules
77
=============
88

9-
* There are plenty of ways you can help, some of them are listed on wiki:
10-
https://wiki.aaps.app/en/latest/Getting-Started/How-can-I-help.html
11-
* If you wish to help with documentation or translating:
12-
https://wiki.aaps.app/en/latest/translations.html
9+
* There are plenty of ways you can help, some of them are listed on wiki:
10+
https://wiki.aaps.app/en/latest/SupportingAaps/HowCanIHelp.html
11+
* If you wish to help with documentation or translating:
12+
https://wiki.aaps.app/en/latest/SupportingAaps/Translations.html
1313

1414
Development guidelines
1515
======================
1616

17-
Coding convetions
17+
Coding conventions
1818
-----------------
1919
1. Use Android Studio with default indents (4 chars, use spaces)
2020
2. Use autoformat feature CTRL-ALT-L in every changed file before commit
2121

2222
Committing Changes / Pull Requests
2323
---------------------------------
2424

25-
1. Make fork of repository on github
25+
1. Make a fork of [repository](https://github.com/nightscout/AndroidAPS) on GitHub (be aware to uncheck the box "Copy the master branch only")
2626
2. Create separate branch for each feature, branch from most recent dev
2727
3. Commit all changes to your fork
28-
4. When ready, rebase on top of dev and make pull request to main repo
28+
4. When ready, rebase on top of dev and make Pull Request to main repo
2929

3030
Naming Conventions for Pull Requests / Branches
3131
-----------------------------------------------
@@ -45,4 +45,4 @@ Hints
4545
* Take a look into Issues list (https://github.com/nightscout/AndroidAPS/issues) - maybe there is something you can fix or implement
4646
* For new features, make sure there is Issue to track progress and have on-topic discussion
4747
* Reach out to community, discuss idea on Discord (https://discord.gg/4fQUWHZ4Mw)
48-
* Speak with other developers to minimise merge conflicts. Find out who worked, working or plan to work on speciffic issue or part of app
48+
* Speak with other developers to minimize merge conflicts. Find out who worked, working or plan to work on specific issue or part of app

ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ Reporting bugs
66
upper-right corner).
77
- Obtain the app's log files, which can be found on the phone in
88
_/storage/emulated/0/Android/data/info.nightscout.androidaps/_
9-
See https://wiki.aaps.app/en/latest/Usage/Accessing-logfiles.html
9+
See https://wiki.aaps.app/en/latest/GettingHelp/AccessingLogFiles.html
1010
- Open an issue at https://github.com/nightscout/AndroidAPS/issues/new

0 commit comments

Comments
 (0)