diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 44182799..17537b68 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,9 +43,6 @@ jobs: - name: Access GOOGLE_SERVICES_JSON run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json - - name: Extract ssl certificate from hoyolab.com and replace - run: openssl s_client -showcerts -connect www.hoyolab.com:443 /dev/null|openssl x509 -outform DER >./app/src/main/res/raw/hoyolab_ca.der - - name: Generate jks file from base64 uses: timheuer/base64-to-file@v1.2 with: diff --git a/.github/workflows/on_pull_request.yml b/.github/workflows/on_pull_request.yml index 43937398..0a4a9d0e 100644 --- a/.github/workflows/on_pull_request.yml +++ b/.github/workflows/on_pull_request.yml @@ -43,9 +43,6 @@ jobs: - name: Access GOOGLE_SERVICES_JSON run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json - - name: Extract ssl certificate from hoyolab.com and replace - run: openssl s_client -showcerts -connect www.hoyolab.com:443 /dev/null|openssl x509 -outform DER >./app/src/main/res/raw/hoyolab_ca.der - - name: Generate jks file from base64 uses: timheuer/base64-to-file@v1.2 with: diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 61d185e8..f03cd0c1 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -20,8 +20,8 @@ android { defaultConfig { applicationId = "com.joeloewi.croissant" - versionCode = 57 - versionName = "1.2.7" + versionCode = 58 + versionName = "1.2.8" targetSdk = 34 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/src/main/kotlin/com/joeloewi/croissant/ui/navigation/main/attendances/screen/LoginHoYoLABScreen.kt b/app/src/main/kotlin/com/joeloewi/croissant/ui/navigation/main/attendances/screen/LoginHoYoLABScreen.kt index 366d294b..1a6398d8 100644 --- a/app/src/main/kotlin/com/joeloewi/croissant/ui/navigation/main/attendances/screen/LoginHoYoLABScreen.kt +++ b/app/src/main/kotlin/com/joeloewi/croissant/ui/navigation/main/attendances/screen/LoginHoYoLABScreen.kt @@ -233,7 +233,7 @@ fun LoginHoYoLABContent( is LoadingState.Loading -> { LinearProgressIndicator( modifier = Modifier.fillMaxWidth(), - progress = progress + progress = { progress } ) } diff --git a/app/src/main/kotlin/com/joeloewi/croissant/worker/CheckSessionWorker.kt b/app/src/main/kotlin/com/joeloewi/croissant/worker/CheckSessionWorker.kt index af44f28c..a9726949 100644 --- a/app/src/main/kotlin/com/joeloewi/croissant/worker/CheckSessionWorker.kt +++ b/app/src/main/kotlin/com/joeloewi/croissant/worker/CheckSessionWorker.kt @@ -97,34 +97,39 @@ class CheckSessionWorker @AssistedInject constructor( createCheckSessionNotification(_attendanceId) ) } + } else { + Firebase.crashlytics.recordException(cause) } + + val executionLogId = insertWorkerExecutionLogUseCase( + WorkerExecutionLog( + attendanceId = _attendanceId, + state = WorkerExecutionLogState.FAILURE, + loggableWorker = LoggableWorker.CHECK_SESSION + ) + ) + + insertFailureLogUseCase( + FailureLog( + executionLogId = executionLogId, + failureMessage = cause.message ?: "", + failureStackTrace = cause.stackTraceToString() + ) + ) + + //let chained works do their jobs + Result.success() } is CancellationException -> { throw cause } - } - - Firebase.crashlytics.recordException(cause) - - val executionLogId = insertWorkerExecutionLogUseCase( - WorkerExecutionLog( - attendanceId = _attendanceId, - state = WorkerExecutionLogState.FAILURE, - loggableWorker = LoggableWorker.CHECK_SESSION - ) - ) - - insertFailureLogUseCase( - FailureLog( - executionLogId = executionLogId, - failureMessage = cause.message ?: "", - failureStackTrace = cause.stackTraceToString() - ) - ) - //let chained works do their jobs - Result.success() + else -> { + Firebase.crashlytics.log("runAttemptCount: $runAttemptCount") + Result.retry() + } + } } ) } diff --git a/app/src/main/res/raw/hoyolab_ca.der b/app/src/main/res/raw/hoyolab_ca.der deleted file mode 100644 index 11b2ba3f..00000000 Binary files a/app/src/main/res/raw/hoyolab_ca.der and /dev/null differ diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml index 2a1d7a9b..88e5fdb5 100644 --- a/app/src/main/res/xml/network_security_config.xml +++ b/app/src/main/res/xml/network_security_config.xml @@ -17,8 +17,5 @@ hoyolab.com - - - \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b07d0c76..b967edbe 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -31,14 +31,14 @@ coil = "2.5.0" hilt = "2.50" hiltExt = "1.1.0" kotlin = "1.9.22" -kotlinxCoroutines = "1.7.3" +kotlinxCoroutines = "1.8.0" kotlinxCollectionsImmutable = "0.3.7" androidxProfileInstaller = "1.3.1" androidxTestRunner = "1.5.2" androidxTestCore = "1.5.0" androidxBenchmarkMacroJunit4 = "1.2.3" androidxTestRules = "1.5.0" -protobuf = "3.25.2" +protobuf = "3.25.3" protobufPlugin = "0.9.4" retrofit = "2.9.0" room = "2.6.1" @@ -46,8 +46,8 @@ moshi = "1.15.1" androidPlayAppUpdateKtx = "2.1.0" androidPlayReviewKtx = "2.0.1" firebaseCrashlyticsPlugin = "2.9.9" -gmsGoogleServicesGradlePlugin = "4.4.0" -firebaseBom = "32.7.1" +gmsGoogleServicesGradlePlugin = "4.4.1" +firebaseBom = "32.7.2" leakcanaryAndroid = "2.13" okhttp3Bom = "4.12.0" inject = "1"