Skip to content

Commit

Permalink
Merge pull request #130 from minvws/sync/20230815-101905
Browse files Browse the repository at this point in the history
Sync public repo from private repository
  • Loading branch information
ktiniatros authored Aug 15, 2023
2 parents 354205c + 1337bcb commit 05887f6
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 66 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ jobs:
with:
web_pdf_tools_commit_hash: ${{ env.WEB_PDF_TOOLS_COMMIT_HASH }}
- name: Build
run: ./gradlew :holder:assemTstRelease :holder:assemAccRelease :holder:assemProdRelease :holder:bundleProdRelease
run: ./gradlew :holder:assemAccRelease :holder:assemProdRelease :holder:bundleProdRelease
- name: Build fdroid
if: ${{ env.GENERATE_FDROID_BUILDS == 'true' }}
run: ./gradlew assemFdroidAccRelease assemFdroidProdRelease
- name: Build verifier
if: ${{ env.GENERATE_VERIFIER_BUILDS == 'true' }}
run: ./gradlew :verifier:assemTstRelease :verifier:assemAccRelease :verifier:assemProdRelease :verifier:bundleProdRelease
run: ./gradlew :verifier:assemAccRelease :verifier:assemProdRelease :verifier:bundleProdRelease
- name: Clean up key store
run: rm keystore.jks
- name: Archive apks
Expand Down Expand Up @@ -114,12 +114,6 @@ jobs:
with:
serviceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}

- name: Distribute holder test variant
run: |
firebase appdistribution:distribute `ls apks/holder/build/outputs/apk/tst/release/holder-*.apk` \
--app 1:168257592968:android:cbb6d05f4163e39026493d \
--groups testers
- name: Distribute holder acc variant
run: |
firebase appdistribution:distribute `ls apks/holder/build/outputs/apk/acc/release/holder-*.apk` \
Expand All @@ -139,13 +133,6 @@ jobs:
--app 1:168257592968:android:aaa5afb416536fdb26493d \
--groups testers
- name: Distribute verifier test variant
if: ${{ env.GENERATE_VERIFIER_BUILDS == 'true' }}
run: |
firebase appdistribution:distribute `ls apks/verifier/build/outputs/apk/tst/release/verifier-*.apk` \
--app 1:168257592968:android:ed609f228437d86f26493d \
--groups testers
- name: Distribute verifier acc variant
if: ${{ env.GENERATE_VERIFIER_BUILDS == 'true' }}
run: |
Expand Down
20 changes: 0 additions & 20 deletions holder/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,6 @@ android {

flavorDimensions "environment"
productFlavors {
tst {
buildConfigField "String", "BASE_API_URL", "\"https://holder-api.test.coronacheck.nl/v9/\""
buildConfigField "String", "CDN_API_URL", "\"https://holder-api.test.coronacheck.nl/v9/\""
buildConfigField "String", "MAX_BASE_URL", "\"https://max.test.coronacheck.nl\""
buildConfigField "String", "OPEN_ID_CLIENT_ID", "\"cc_app\""
buildConfigField "String", "OPEN_ID_REDIRECT_URL", "\"https://web.test.coronacheck.nl/app/auth2\""
buildConfigField "String", "DEEPLINK_SCANNER_TEST_URL", "\"https://web.acc.coronacheck.nl/verifier/scan?returnUri=https://web.test.coronacheck.nl/app/open?returnUri=scanner-test\""
buildConfigField "String", "MIJNCN_BASEURL", "\"https://emax.test.coronacheck.nl\""
buildConfigField "String", "PAP_BASE_URL", "\"https://pap.bananenhalen.nl/\""
dimension "environment"
versionNameSuffix "-test"
applicationIdSuffix ".test"
manifestPlaceholders = [appLabel: "@string/app_name_test", deepLinkHost: "web.test.coronacheck.nl", digidSchema: "coronacheck-test"]
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
matchingFallbacks = ['mlkit']
buildConfigField "boolean", "FEATURE_TEST_PROVIDER_API_CHECKS", "true"
buildConfigField "boolean", "FEATURE_CORONA_CHECK_API_CHECKS", "false"
}
acc {
buildConfigField "String", "BASE_API_URL", "\"https://holder-api.acc.coronacheck.nl/v9/\""
buildConfigField "String", "CDN_API_URL", "\"https://holder-api-cdn.acc.coronacheck.nl/v9/\""
Expand Down Expand Up @@ -140,7 +121,6 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
productFlavors.tst.signingConfig signingConfigs.release
productFlavors.acc.signingConfig signingConfigs.release
productFlavors.prod.signingConfig signingConfigs.release
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import com.google.zxing.common.HybridBinarizer
import nl.rijksoverheid.ctr.qrscanner.databinding.FragmentScannerBinding
import timber.log.Timber

// This source file is based in part on the work of https://github.com/obfusk licensed under the EUPL
// Original code: https://github.com/minvws/nl-covid19-coronacheck-app-android/compare/main...obfusk:nl-covid19-coronacheck-app-android:foss
// Copyright 2021 (c) obfusk

class QrCodeProcessorImpl : QrCodeProcessor {

@SuppressLint("UnsafeOptInUsageError")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import android.os.Build
*
*/
sealed class Environment {
object Tst : Environment()
object Acc : Environment()
object Prod : Environment()
object InstrumentationTests : Environment()
Expand All @@ -21,7 +20,6 @@ sealed class Environment {
return with(context.packageName) {
when {
contains(".test") || isRobolectricTest() -> InstrumentationTests
contains(".tst") -> Tst
contains(".acc") -> Acc
else -> Prod
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ class WebsiteEnvironmentUtilImpl(
coronaCheckUrl,
"web.acc.coronacheck.nl/"
)
Environment.Tst -> stripWwwFromCoronacheckLinks(url).replace(
coronaCheckUrl,
"web.test.coronacheck.nl/"
)
else -> url
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ class WebsiteEnvironmentUtilImplTest {
assert(websiteEnvironmentUtil.adjust(url) == "https://web.acc.coronacheck.nl/en/faq-in-app.html")
}

@Test
fun `given a coronacheck url, when test, then return test web url`() {
every { context.packageName } returns "nl.rijksoverheid.ctr.holder.tst"

assert(websiteEnvironmentUtil.adjust(url) == "https://web.test.coronacheck.nl/en/faq-in-app.html")
}

@Test
fun `given a coronacheck url, when prod, then return prod web url`() {
every { context.packageName } returns "nl.rijksoverheid.ctr.holder"
Expand Down
19 changes: 1 addition & 18 deletions verifier/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,9 @@ android {
}
}

flavorDimensions "environment"
flavorDimensions ('environment')
productFlavors {
tst {
dimension "environment"
versionNameSuffix "-test"
applicationIdSuffix ".test"
manifestPlaceholders = [appLabel: "@string/app_name_test"]
buildConfigField "String", "BASE_API_URL", "\"https://verifier-api.test.coronacheck.nl/v8/\""
buildConfigField "String", "CDN_API_URL", "\"https://verifier-api-cdn.test.coronacheck.nl/v8/\""
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
manifestPlaceholders = [appLabel: "@string/app_name_test", deepLinkHost: "web.test.coronacheck.nl"]
matchingFallbacks = ['mlkit']
}
acc {
dimension "environment"
versionNameSuffix "-acc"
applicationIdSuffix ".acc"
manifestPlaceholders = [appLabel: "@string/app_name_acc"]
Expand All @@ -83,7 +70,6 @@ android {
matchingFallbacks = ['mlkit']
}
fdroidAcc {
dimension "environment"
versionNameSuffix "-fdroid"
applicationIdSuffix ".fdroid.acc"
manifestPlaceholders = [appLabel: "@string/app_name_acc"]
Expand All @@ -93,11 +79,9 @@ android {
matchingFallbacks = ['zxing']
}
prod {
dimension "environment"
matchingFallbacks = ['mlkit']
}
fdroidProd {
dimension "environment"
matchingFallbacks = ['zxing']
}
}
Expand All @@ -106,7 +90,6 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
productFlavors.tst.signingConfig signingConfigs.release
productFlavors.acc.signingConfig signingConfigs.release
productFlavors.prod.signingConfig signingConfigs.release
}
Expand Down

0 comments on commit 05887f6

Please sign in to comment.