Skip to content

Commit

Permalink
Merge pull request #131 from minvws/sync/20231107-153113
Browse files Browse the repository at this point in the history
Sync/20231107 153113
  • Loading branch information
ktiniatros authored Nov 7, 2023
2 parents 05887f6 + 224b766 commit 8e0d30f
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-core/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ runs:
if: steps.corecache.outputs.cache-hit != 'true'
uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f
with:
go-version-file: 'mobilecore-src/go.mod'
go-version: '1.20.6'
- name: Build mobile core
if: steps.corecache.outputs.cache-hit != 'true'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'temurin'
- name: Show java version
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Spotless
run: ./gradlew spotlessCheck
- name: Test
run: ./gradlew testDebug testAccDebug holder:lintAccDebug verifier:lintAccDebug
run: ./gradlew testAccDebugUnitTest verifier:testAccDebugUnitTest
- name: Emulator Test
if: "!contains(github.event.pull_request.labels.*.name, 'skip-screenshot-tests')"
uses: reactivecircus/android-emulator-runner@v2
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ allprojects {

project.plugins.withId("com.android.base") {
android {
compileSdkVersion 33
compileSdkVersion 34
defaultConfig {
minSdkVersion 23
targetSdkVersion 33
targetSdkVersion 34
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=false
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
kotlin.code.style=official
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
42 changes: 21 additions & 21 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
[versions]
agp = "7.4.2"
agp = "8.1.1"
androidx-appcompat = "1.6.1"
androidx-arch-core = "2.2.0"
androidx-camera = "1.3.0-alpha04"
androidx-core = "1.9.0"
androidx-fragment = "1.5.5"
androidx-lifecycle = "2.5.1"
androidx-navigation = "2.5.3"
androidx-camera = "1.3.0"
androidx-core = "1.12.0"
androidx-fragment = "1.6.2"
androidx-lifecycle = "2.6.2"
androidx-navigation = "2.7.5"
androidx-orchestrator = "1.4.2"
androidx-preference = "1.2.0"
androidx-room = "2.5.0"
androidx-preference = "1.2.1"
androidx-room = "2.6.0"
androidx-test = "1.5.0"
androidx-work = "2.8.1"
bouncycastle = "1.72"
certificatetransparency = "1.1.1"
coroutines = "1.6.4"
coroutines = "1.7.3"
groupie = "2.9.0"
koin = "3.2.2"
koin = "3.5.0"
# @pin update Kotlin manually
kotlin = "1.8.10"
kotlin = "1.9.20"
mockk = "1.13.4"
moshi = "1.14.0"
retrofit = "2.9.0"
uiautomator = "2.2.0"

[libraries]
androidx-browser = "androidx.browser:browser:1.5.0"
androidx-browser = "androidx.browser:browser:1.6.0"
androidx-core = { module = "androidx.core:core-ktx", version.ref = "androidx-core" }
androidx-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "androidx-arch-core" }
androidx-preference = { module = "androidx.preference:preference-ktx", version.ref = "androidx-preference" }
androidx-security-crypto = "androidx.security:security-crypto:1.0.0"
androidx-test-core = { module = "androidx.test:core-ktx", version.ref = "androidx-test" }
androidx-test-junit = "androidx.test.ext:junit-ktx:1.1.5"
androidx-test-monitor = "androidx.test:monitor:1.6.0"
androidx-test-monitor = "androidx.test:monitor:1.6.1"
androidx-test-orchestrator = { module = "androidx.test:orchestrator", version.ref = "androidx-orchestrator" }
androidx-test-rules = { module = "androidx.test:rules", version.ref = "androidx-test" }
androidx-test-runner = "androidx.test:runner:1.5.2"
Expand All @@ -47,8 +47,8 @@ certificatetransparency-android = { module = "com.appmattus.certificatetranspare
constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.4"
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
crashlytics = "com.google.firebase:firebase-crashlytics-ktx:18.3.5"
desugar = "com.android.tools:desugar_jdk_libs:2.0.2"
crashlytics = "com.google.firebase:firebase-crashlytics-ktx:18.5.1"
desugar = "com.android.tools:desugar_jdk_libs:2.0.4"
espresso-core = "androidx.test.espresso:espresso-core:3.5.1"
fragment = { module = "androidx.fragment:fragment-ktx", version.ref = "androidx-fragment" }
fragment-testing = { module = "androidx.fragment:fragment-testing", version.ref = "androidx-fragment" }
Expand All @@ -60,8 +60,8 @@ koin-test-junit4 = { module = "io.insert-koin:koin-test-junit4", version.ref = "
lifecycle-livedata = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "androidx-lifecycle" }
lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
lottie = "com.airbnb.android:lottie:6.0.0"
material = "com.google.android.material:material:1.8.0"
mlkit-barcode = "com.google.android.gms:play-services-mlkit-barcode-scanning:18.1.0"
material = "com.google.android.material:material:1.10.0"
mlkit-barcode = "com.google.android.gms:play-services-mlkit-barcode-scanning:18.3.0"
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockk" }
moshi-adapters = { module = "com.squareup.moshi:moshi-adapters", version.ref = "moshi" }
Expand All @@ -78,7 +78,7 @@ okhttp-tls = { module = "com.squareup.okhttp3:okhttp-tls" }
openid-appauth = "net.openid:appauth:0.11.1"
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
retrofit-moshi = { module = "com.squareup.retrofit2:converter-moshi", version.ref = "retrofit" }
robolectric = "org.robolectric:robolectric:4.9.2"
robolectric = "org.robolectric:robolectric:4.10.3"
room = { module = "androidx.room:room-ktx", version.ref = "androidx-room" }
room-compiler = { module = "androidx.room:room-compiler", version.ref = "androidx-room" }
room-runtime = { module = "androidx.room:room-runtime", version.ref = "androidx-room" }
Expand All @@ -90,7 +90,7 @@ uiautomator = { module = "androidx.test.uiautomator:uiautomator", version.ref =
viewpager2 = "androidx.viewpager2:viewpager2:1.0.0"
work-runtime = { module = "androidx.work:work-runtime-ktx", version.ref = "androidx-work" }
work-testing = { module = "androidx.work:work-testing", version.ref = "androidx-work" }
zxing-core = "com.google.zxing:core:3.5.1"
zxing-core = "com.google.zxing:core:3.5.2"

[bundles]
groupie = [
Expand All @@ -106,9 +106,9 @@ googleServices = "com.google.gms.google-services:4.3.15"
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
# @pin dependent on Kotlin version
ksp = "com.google.devtools.ksp:1.8.10-1.0.9"
ksp = "com.google.devtools.ksp:1.9.20-1.0.14"
navigation-safeargs-kotlin = { id = "androidx.navigation.safeargs.kotlin", version.ref = "androidx-navigation" }
shot = "shot:5.14.1"
shot = "shot:6.0.0"
spotless = "com.diffplug.spotless:5.10.1"
versionCatalogUpdate = "nl.littlerobots.version-catalog-update:0.7.0"
versions = "com.github.ben-manes.versions:0.46.0"
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fun <T> LiveData<T>.getOrAwaitValue(
var data: T? = null
val latch = CountDownLatch(1)
val observer = object : Observer<T> {
override fun onChanged(o: T?) {
override fun onChanged(o: T) {
data = o
latch.countDown()
this@getOrAwaitValue.removeObserver(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ data class Event<out T>(private val content: T) {
* [onEventUnhandledContent] is *only* called if the [Event]'s contents has not been handled.
*/
class EventObserver<T>(private val onEventUnhandledContent: (T) -> Unit) : Observer<Event<T>> {
override fun onChanged(event: Event<T>?) {
event?.getContentIfNotHandled()?.let { value ->
onEventUnhandledContent(value)

override fun onChanged(value: Event<T>) {
value.getContentIfNotHandled()?.let {
onEventUnhandledContent(it)
}
}
}
8 changes: 7 additions & 1 deletion spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ apply plugin: "com.diffplug.spotless"

spotless {
kotlin {
target '**/*.kt'
target 'api/*.kt'
target 'appconfig/*.kt'
target 'design/*.kt'
target 'holder/*.kt'
target 'introduction/*.kt'
target 'qrscanner/*.kt'
target 'shared/*.kt'
ktlint()
trimTrailingWhitespace()
indentWithSpaces()
Expand Down

0 comments on commit 8e0d30f

Please sign in to comment.