From 2b6fe2179248537f092d2b44ed48c603671e5cdf Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Wed, 16 Feb 2022 10:52:58 +0100 Subject: [PATCH] Parse input certificates --- app/build.gradle | 14 ++++++++ app/src/main/AndroidManifest.xml | 18 ++++++++-- .../communiquons/dccaggregator/Constants.kt | 4 +++ .../dccaggregator/activities/CertsManager.kt | 33 ++++++++++++++++++- .../dccaggregator/models/Certificate.kt | 27 +++++++++++++++ app/src/main/res/values/strings.xml | 2 ++ build.gradle | 1 + settings.gradle | 1 + 8 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 app/src/main/java/org/communiquons/dccaggregator/Constants.kt create mode 100644 app/src/main/java/org/communiquons/dccaggregator/models/Certificate.kt diff --git a/app/build.gradle b/app/build.gradle index 3c77a69..094fc5e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,6 +23,8 @@ android { } } compileOptions { + coreLibraryDesugaringEnabled = true + sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } @@ -33,6 +35,15 @@ android { buildFeatures { viewBinding = true } + + packagingOptions { + pickFirst 'META-INF/ASL-2.0.txt' + pickFirst 'draftv4/schema' + pickFirst 'draftv3/schema' + pickFirst 'META-INF/LGPL-3.0.txt' + } + + kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn" } dependencies { @@ -42,8 +53,11 @@ dependencies { implementation 'androidx.constraintlayout:constraintlayout:2.1.3' implementation 'androidx.preference:preference:1.2.0' implementation 'com.journeyapps:zxing-android-embedded:4.3.0' + implementation 'com.github.eu-digital-green-certificates:dgca-app-core-android:e4ad73eef8' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.1' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5") } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e8dc064..10b3117 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -29,8 +29,22 @@ + android:exported="true" + android:label="@string/activity_certsmanagers"> + + + + + + + + + + + Input certificates Add a new certificate Please present the QrCode of the certificate you want to add + Import certificate + The given certificate could not be decoded! \ No newline at end of file diff --git a/build.gradle b/build.gradle index fcb3742..48c7db4 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ buildscript { repositories { google() mavenCentral() + maven { url 'https://jitpack.io' } } dependencies { classpath "com.android.tools.build:gradle:7.0.4" diff --git a/settings.gradle b/settings.gradle index 3df71c9..706506c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,6 +3,7 @@ dependencyResolutionManagement { repositories { google() mavenCentral() + maven { url 'https://jitpack.io' } jcenter() // Warning: this repository is going to shut down soon } }