Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back to Lower minSDK = API Level 23 - MM6.0 #202

Open
wants to merge 61 commits into
base: main
Choose a base branch
from

Conversation

rawmain
Copy link

@rawmain rawmain commented Sep 7, 2021

An additional gradle dependency for jackson-datatype-jsr310 is required anyway in order to lower minSDK again from API 26 (Oreo 8.0) to API 23 (Marshmallow 6.0) - reference issue #175 (comment) .

It allows indeed Jackson to recognize Java 8 Date & Time API data types (JSR-310) when desugaring has been set/enabled in app/build.gradle + minSDK=23 & the dgca-verifier-app is running on Android 23<=API<26 devices.

Otherwise, an exception is raised.


Other changes :

  • Changed zxing:core from 3.3.0 to 3.3.2 (default version for zxing-android-embedded 3.6.0) = working OK with API 23+ devices

  • Replaced with paddingLeft/paddingRight in order to avoid LINT rules override. XML android:paddingHorizontal triggers indeed a LINT error when minSDK <26 = AAPT2 supports desugaring backwards-translation for XML attribute android:paddingHorizontal, but only for layout files, not styles - IssueTracker Reference

  • Enabled explicit Desugaring support for project revocation 0559bdc

  • Explicited iterator() in order to avoid lint errors without changing gradle version because of the confusion - between the Kotlin Iterable.forEach extension function and the Java8 forEach function - on debug variants (owing to desugaring) 882aff8

  • Using Collections.sort method to sort arrayList in natural order (ascending) & avoid API issues 1313066

An additional gradle dependency for jackson-datatype-jsr310 is required in order to lower minSDK again from API 26 (Oreo 8.0) to API 23 (Marshmallow 6.0).

It allows indeed Jackson to recognize Java 8 Date & Time API data types (JSR-310) when desugaring has been set/enabled in app/build.gradle + minSDK=23 & the dgca-verifier-app is running on Android 23<=API<26 devices.

Otherwise, an exception is raised.

------

Other changes :

- Changed zxing:core from 3.3.0 to 3.3.2 (default version for zxing-android-embedded 3.6.0) = working OK with API 23+ devices

-  XML android:paddingHorizontal triggers a LINT error when minSDK <26. Replaced with paddingLeft/paddingRight in order to avoid LINT rules override = AAPT2 2.19 could support backwards translation, but it would have required to disable/override LINT checks.
An additional gradle dependency for jackson-datatype-jsr310 is required in order to lower minSDK again from API 26 (Oreo 8.0) to API 23 (Marshmallow 6.0).

It allows indeed Jackson to recognize Java 8 Date & Time API data types (JSR-310) when desugaring has been set/enabled in app/build.gradle + minSDK=23 & the dgca-verifier-app is running on Android 23<=API<26 devices.

Otherwise, an exception is raised.

------

Other changes :

- Changed zxing:core from 3.3.0 to 3.3.2 (default version for zxing-android-embedded 3.6.0) = working OK with API 23+ devices

-  XML android:paddingHorizontal triggers a LINT error when minSDK <26. Replaced with paddingLeft/paddingRight in order to avoid LINT rules override = AAPT2 2.19 could support backwards translation, but it would have required to disable/override LINT checks.
app/src/main/res/values/styles.xml Outdated Show resolved Hide resolved
app/build.gradle Outdated Show resolved Hide resolved
Aligned minSdk declaration in library [:branches:base]
Apply Desugaring Edits to branches\dcc build.gradle
Apply Desugaring Edits to branches\vc build.gradle
Added iterator() in order to avoid the confusion - between the Kotlin Iterable.forEach extension function and the Java8 forEach function -  while desugaring
android:paddingHorizontal requires API level 26 - replaced with paddingLeft/paddingRight (API 23 compatibility)
Aligned desugaring edits for app/branches gradle scripts (in order to avoid runtime issues on device with API level < 26)
@rawmain
Copy link
Author

rawmain commented Jun 28, 2022

June 28th 2022 Additional Changes after Multi-Type Certificates merge :

  • Aligned desugaring settings/edits for app + branches (base, dcc, divoc, icao, sh, vc)

  • Applied iterator() & paddingLeft/paddingRight fixes in branches:vc

Increase Gradle daemon memory size in order to prevent "GC overhead limit exceeded" exception errors
@rawmain
Copy link
Author

rawmain commented Aug 30, 2022

August 30th 2022 Additional Changes after ProGuard updates :

  • Increased Gradle daemon memory size (up to 6GB) in order to prevent "GC overhead limit exceeded" exception errors in CI workflow runs

Explicited iterator() in order to avoid lint errors without changing gradle version because of the confusion - between the Kotlin Iterable.forEach extension function and the Java8 forEach function - on debug variants (owing to desugaring)
Upgraded Desugaring Libs from 1.1.5 to 2.0.0.

Related dependency/plugin changes :

- Gradle Wrapper 6.5 -> 7.5.1
- AGP (Android Gradle Plugin) 4.1.3 -> 7.4.0-beta05

- Hilt (Dagger) 2.38.1 -> 2.42
- Removed dependency androidx.hilt:hilt-lifecycle-viewmodel - since it's already included in Hilt 2.42
Edit in order to fix "Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)" with Github Actions
Github Actions with AGP 7.4.0-beta05 incorrectly triggers a LINT error with decoder module.

Such edit allows to bypass this bug.
Github Actions with AGP 7.4.0-beta05 incorrectly triggers a LINT error with decoder module.

Such edit on project gradle allows to bypass this bug for all modules
Edit in order to avoid bug with Github Action - Manifest merger failed : uses-sdk:minSdkVersion 23 cannot be smaller than version 24 declared in library [com.journeyapps:zxing-android-embedded:4.2.0]
Edit in order to avoid bug with Github Action - Manifest merger failed : uses-sdk:minSdkVersion 23 cannot be smaller than version 24 declared in library [com.journeyapps:zxing-android-embedded:4.2.0]
@rawmain
Copy link
Author

rawmain commented Nov 23, 2022

November 23, 2022 Additional Changes after Dependencies Upgrade :

  • Full Upgrade for Desugaring Libs from 1.1.5 to 2.0.0 to support >=API 23

Related dependency/plugin changes :

  • Gradle Wrapper 6.5 -> 7.5.1
  • AGP (Android Gradle Plugin) 4.1.3 -> 7.4.0-beta05 (*)
  • Hilt (Dagger) 2.38.1 -> 2.42
  • Removed dependency androidx.hilt:hilt-lifecycle-viewmodel - since it's already included in Hilt 2.42

(*) AGP 7.4.0-beta05 is supported by Android Studio since release Electric Eel (2022.1.1) Beta 5

  • Explicited iterator() for DefaultProtocolHandler.kt in order to avoid lint errors without changing gradle version because of the confusion - between the Kotlin Iterable.forEach extension function and the Java8 forEach function - on debug variants (owing to desugaring) 8ac1091

  • CI edit + GRADLE_OPTS in order to avoid LINT issues with Github Actions 448a70f

  • Override to bypass CI LINT bug by disabling the ExpiredTargetSdkVersion LINT check for all projects/modules 6a7ed9d

  • Override Zxing Camera for DCC branch 23e67b4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants