Skip to content

Commit bce76e7

Browse files
authored
Merge pull request #13 from tiritea/master
Update to ODK Collect v2024.2.4 release
2 parents 5d12063 + c668aeb commit bce76e7

File tree

862 files changed

+21592
-9128
lines changed

Some content is hidden

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

862 files changed

+21592
-9128
lines changed

.circleci/config.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ references:
77
android_config: &android_config
88
working_directory: ~/work
99
docker:
10-
- image: cimg/android:2023.10.1
10+
- image: cimg/android:2024.01
1111
resource_class: medium+
1212

1313
jobs:
@@ -17,7 +17,7 @@ jobs:
1717
- checkout
1818
- run:
1919
name: Generate combined build.gradle file for cache key
20-
command: cat build.gradle */build.gradle .circleci/gradle.properties .circleci/config.yml buildSrc/src/main/java/dependencies/Dependencies.kt buildSrc/src/main/java/dependencies/Versions.kt > deps.txt
20+
command: cat build.gradle */build.gradle */build.gradle.kts .circleci/gradle.properties .circleci/config.yml buildSrc/src/main/java/dependencies/Dependencies.kt buildSrc/src/main/java/dependencies/Versions.kt > deps.txt
2121
- restore_cache:
2222
keys:
2323
- compile-deps-{{ checksum "deps.txt" }}
@@ -230,8 +230,8 @@ jobs:
230230
command: ./gradlew assembleSelfSignedRelease
231231

232232
- run:
233-
name: Check APK size isn't larger than 10.6MB
234-
command: if [ $(ls -l collect_app/build/outputs/apk/selfSignedRelease/*.apk | awk '{print $5}') -gt 10600000 ]; then exit 1; fi
233+
name: Check APK size isn't larger than 11.5MB
234+
command: ./check-size.sh
235235

236236
- run:
237237
name: Copy APK to predictable path for artifact storage
@@ -282,7 +282,7 @@ jobs:
282282
--type instrumentation \
283283
--app collect_app/build/outputs/apk/debug/*.apk \
284284
--test collect_app/build/outputs/apk/androidTest/debug/*.apk \
285-
--device model=MediumPhone.arm,version=30,locale=en,orientation=portrait \
285+
--device model=MediumPhone.arm,version=34,locale=en,orientation=portrait \
286286
--results-bucket opendatakit-collect-test-results \
287287
--directories-to-pull /sdcard --timeout 20m \
288288
--test-targets "package org.odk.collect.android.feature.smoke"
@@ -333,9 +333,10 @@ jobs:
333333
--num-uniform-shards=25 \
334334
--app collect_app/build/outputs/apk/debug/*.apk \
335335
--test collect_app/build/outputs/apk/androidTest/debug/*.apk \
336-
--device model=MediumPhone.arm,version=30,locale=en,orientation=portrait \
336+
--device model=MediumPhone.arm,version=34,locale=en,orientation=portrait \
337337
--results-bucket opendatakit-collect-test-results \
338-
--directories-to-pull /sdcard --timeout 20m
338+
--directories-to-pull /sdcard --timeout 20m \
339+
--test-targets "notPackage org.odk.collect.android.regression"
339340
fi
340341
no_output_timeout: 25m
341342

.circleci/test_modules.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
shared
2-
formstest
2+
forms-test
33
androidshared
44
async
55
strings
6-
audioclips
7-
audiorecorder
6+
audio-clips
7+
audio-recorder
88
projects
99
location
1010
geo
@@ -21,3 +21,5 @@ metadata
2121
selfie-camera
2222
draw
2323
printer
24+
lists
25+
web-page

.editorconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
root = true
2+
3+
[*.{kt,kts}]
4+
ktlint_standard_no-blank-lines-in-chained-method-calls = disabled
5+
ktlint_standard_trailing-comma-on-call-site = disabled
6+
ktlint_standard_trailing-comma-on-declaration-site = disabled
7+
ktlint_standard_function-signature = disabled
8+
ktlint_standard_no-empty-first-line-in-class-body = disabled
9+
ktlint_standard_argument-list-wrapping = disabled
10+
ktlint_standard_parameter-list-wrapping = disabled
11+
ktlint_standard_multiline-expression-wrapping = disabled
12+
ktlint_standard_max-line-length = disabled
13+
ktlint_standard_string-template-indent = disabled
14+
ktlint_standard_annotation = disabled
15+
ktlint_standard_value-parameter-comment = disabled
16+
ktlint_standard_property-naming = disabled
17+
ktlint_standard_value-argument-comment = disabled
18+
ktlint_standard_blank-line-before-declaration = disabled
19+
ktlint_standard_no-consecutive-comments = disabled
20+
ktlint_standard_enum-wrapping = disabled
21+
ktlint_standard_statement-wrapping = disabled
22+
ktlint_standard_try-catch-finally-spacing = disabled
23+
ktlint_standard_wrapping = disabled

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ https://github.com/getodk/collect/blob/master/docs/CONTRIBUTING.md
1919
- [ ] added or modified tests for any new or changed behavior
2020
- [ ] run `./gradlew connectedAndroidTest` (or `./gradlew testLab`) and confirmed all checks still pass
2121
- [ ] added a comment above any new strings describing it for translators
22+
- [ ] added any new strings with date formatting to `DateFormatsTest`
2223
- [ ] verified that any code or assets from external sources are properly credited in comments and/or in the [about file](https://github.com/getodk/collect/blob/master/collect_app/src/main/assets/open_source_licenses.html).
2324
- [ ] verified that any new UI elements use theme colors. [UI Components Style guidelines](https://github.com/getodk/collect/blob/master/docs/CODE-GUIDELINES.md#ui-components-style-guidelines)

analytics/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,5 @@ dependencies {
3737
implementation(Dependencies.kotlin_stdlib)
3838
implementation(Dependencies.androidx_core_ktx)
3939
implementation(Dependencies.firebase_crashlytics)
40-
implementation(Dependencies.firebase_analytics) {
41-
exclude(group = "com.google.guava")
42-
}
40+
implementation(Dependencies.firebase_analytics)
4341
}

analytics/src/main/java/org/odk/collect/analytics/Analytics.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,9 @@ interface Analytics {
4141
fun setParam(key: String, value: String) {
4242
params[key] = value
4343
}
44+
45+
fun setUserProperty(name: String, value: String) {
46+
instance.setUserProperty(name, value)
47+
}
4448
}
4549
}

androidshared/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ dependencies {
5959
implementation(Dependencies.play_services_location)
6060

6161
testImplementation(project(":test-shared"))
62+
testImplementation(project(":androidtest"))
6263
testImplementation(Dependencies.junit)
6364
testImplementation(Dependencies.androidx_test_ext_junit)
6465
testImplementation(Dependencies.androidx_test_espresso_core)

androidshared/src/androidTest/java/org/odk/collect/androidshared/bitmap/ImageCompressorTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ class ImageCompressorTest {
153153
ExifInterface.TAG_GPS_SATELLITES to "8",
154154
ExifInterface.TAG_GPS_STATUS to "A",
155155
ExifInterface.TAG_ORIENTATION to "1",
156-
157156
// unsupported exif tags
158157
ExifInterface.TAG_THUMBNAIL_IMAGE_LENGTH to "5",
159158
ExifInterface.TAG_DNG_VERSION to "100"

androidshared/src/main/java/org/odk/collect/androidshared/async/TrackableWorker.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package org.odk.collect.androidshared.async
33
import org.odk.collect.androidshared.livedata.MutableNonNullLiveData
44
import org.odk.collect.androidshared.livedata.NonNullLiveData
55
import org.odk.collect.async.Scheduler
6+
import java.util.concurrent.atomic.AtomicInteger
67
import java.util.function.Consumer
78
import java.util.function.Supplier
89

@@ -11,10 +12,15 @@ class TrackableWorker(private val scheduler: Scheduler) {
1112
private val _isWorking = MutableNonNullLiveData(false)
1213
val isWorking: NonNullLiveData<Boolean> = _isWorking
1314

15+
private var activeBackgroundJobsCounter = AtomicInteger(0)
16+
1417
fun <T> immediate(background: Supplier<T>, foreground: Consumer<T>) {
18+
activeBackgroundJobsCounter.incrementAndGet()
1519
_isWorking.value = true
1620
scheduler.immediate(background) { result ->
17-
_isWorking.value = false
21+
if (activeBackgroundJobsCounter.decrementAndGet() == 0) {
22+
_isWorking.value = false
23+
}
1824
foreground.accept(result)
1925
}
2026
}

androidshared/src/main/java/org/odk/collect/androidshared/bitmap/ImageFileUtils.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@ object ImageFileUtils {
150150
}
151151
if (sourceFileExif == null ||
152152
!EXIF_ORIENTATION_ROTATIONS.contains(
153-
sourceFileExif
154-
.getAttributeInt(
155-
ExifInterface.TAG_ORIENTATION,
156-
ExifInterface.ORIENTATION_UNDEFINED
157-
)
158-
)
153+
sourceFileExif
154+
.getAttributeInt(
155+
ExifInterface.TAG_ORIENTATION,
156+
ExifInterface.ORIENTATION_UNDEFINED
157+
)
158+
)
159159
) {
160160
// Source Image doesn't have any EXIF Rotations, so a normal file copy will suffice
161161
sourceFile.copyTo(destFile, true)

0 commit comments

Comments
 (0)