ministero-salute / it-dgc-verificaC19-android

VerificaC19 is the official Italian customization of the EU Digital COVID Certificate Verifier App for the Android Operating System
https://www.dgc.gov.it
Apache License 2.0
101 stars 54 forks source link

chore: update dependencies #236

Closed Kaizen-7 closed 2 years ago

astagi commented 2 years ago

@Kaizen-7 build is failing, can't merge this PR.

Kaizen-7 commented 2 years ago

please merge sdk PR again and then try to build again, the issue should've been fixed

astagi commented 2 years ago

please merge sdk PR again and then try to build again, the issue should've been fixed

Build's still failing, am I missing something?

Kaizen-7 commented 2 years ago

@astagi the last sdk PR didn't include everything somehow, I've opened it again but I merged develop into it before

astagi commented 2 years ago

you shouldn't get any error if you align your SDK to my last commit in ministero-salute/it-dgc-verificac19-sdk-android#106, it seems to be a problem related to duplicated dependencies in SDK Gradle file, when I revert this line as you suggested I've got another error that said to remove the "android" part, so let me know if it works with my latest commit

still failing with this message

* What went wrong:
Execution failed for task ':dgc-sdk:kaptReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
   > java.lang.reflect.InvocationTargetException (no error message)
rawmain commented 2 years ago

Hello @astagi & @Kaizen-7

still failing with this message

* What went wrong:
Execution failed for task ':dgc-sdk:kaptReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
   > java.lang.reflect.InvocationTargetException (no error message)

Such build-exception happens with CI action - and not with Android Studio - because of the JDK version setting.

If you edit the params of actions/setup-java@v1 by changing java-version from 1.8 to 11 (in order to align with the embedded release of Android Studio), you'll get indeed build OK also with the CI Github action.

Reason : As you can also notice from the stacktrace, the exception is related to :

Caused by: java.lang.AssertionError: annotationType(): unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)

Since this PR also includes compileSdk/targetSdk upgrade in AppConfig from API Level 30 (Android 11/R) to 31 (Android 12/S), you can't keep using java-version 8, but you're required to set 11 at least.


Required additional Fixes to refactor/update-dependencies branch before merge

Upgrading compileSdk/targetSdk from 30 to 31 together with dependencies-refactoring requires additional fixes in order to avoid runtime exceptions/crash while running the whitelabel-app with DGC-SDK on devices with Android 12/S.