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

Feature/obfusc #204

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
.externalNativeBuild
.cxx
local.properties

*.jks
debug.keystore.properties
16 changes: 15 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ plugins {
id 'kotlin-parcelize'
}

def debugKeystorePropertiesFile = rootProject.file("debug.keystore.properties")
def debugKeystoreProperties = new Properties()
debugKeystoreProperties.load(new FileInputStream(debugKeystorePropertiesFile))

android {
compileSdkVersion Config.compileSdk

Expand All @@ -22,9 +26,19 @@ android {
testInstrumentationRunner Config.androidTestInstrumentation
}

signingConfigs {
debug {
keyAlias debugKeystoreProperties['keyAlias']
keyPassword debugKeystoreProperties['keyPassword']
storeFile file(debugKeystoreProperties['storeFile'])
storePassword debugKeystoreProperties['storePassword']
}
}

buildTypes {
release {
minifyEnabled false
signingConfig signingConfigs.debug
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
17 changes: 16 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,19 @@
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-keep public class dgca.verifier.app.decoder.model.*
-keep public class com.github.fge.jsonschema.** { *; }
-keep public class com.github.fge.jsonschema.** { *; }

-keepnames class androidx.navigation.fragment.NavHostFragment
-keep class * extends androidx.fragment.app.Fragment{}

-keepnames class * extends android.os.Parcelable
-keepnames class * extends java.io.Serializable

-keep class dgca.wallet.app.android.dcc.data.* { *; }
-keep class dgca.wallet.app.android.dcc.data.remote.claim.* { *; }
-keep class feature.ticketing.domain.data.accesstoken.* { *; }
-keep class feature.ticketing.domain.data.identity.* { *; }
-keep class feature.ticketing.domain.data.checkin.TicketingCheckInRemote { *; }
-keep class feature.ticketing.domain.data.validate.* { *; }
-keep class feature.ticketing.domain.identity.accesstoken.* { *; }
-keep class feature.ticketing.domain.identity.validityserviceidentity.* { *; }
2 changes: 1 addition & 1 deletion branches/base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ android {

buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
7 changes: 5 additions & 2 deletions branches/dcc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ android {

// It's required to provide config json files, and path to it.
// Examples based on different flavors could be found here: 'app/src/acc/assets/wallet-context.jsonc' or 'app/src/tst/assets/wallet-context.jsonc'
buildConfigField "String", "CONFIG_FILE_NAME", "\"$CONFIG_FILE_NAME\""
def configFileName = project.properties["CONFIG_FILE_NAME"]
println "Config file name: $configFileName"

buildConfigField "String", "CONFIG_FILE_NAME", "\"$configFileName\""

buildConfigField "int", "VERSION_CODE", "$versionCode"
buildConfigField "String", "VERSION_NAME", "\"$versionName\""
}

buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
14 changes: 13 additions & 1 deletion branches/dcc/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,16 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

-keepnames class * extends android.os.Parcelable
-keepnames class * extends java.io.Serializable

-keep class dgca.wallet.app.android.dcc.data.* { *; }
-keep class dgca.wallet.app.android.dcc.data.remote.claim.* { *; }
-keep class feature.ticketing.domain.data.accesstoken.* { *; }
-keep class feature.ticketing.domain.data.identity.* { *; }
-keep class feature.ticketing.domain.data.checkin.TicketingCheckInRemote { *; }
-keep class feature.ticketing.domain.data.validate.* { *; }
-keep class feature.ticketing.domain.identity.accesstoken.* { *; }
-keep class feature.ticketing.domain.identity.validityserviceidentity.* { *; }
2 changes: 1 addition & 1 deletion branches/divoc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ android {

buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
2 changes: 1 addition & 1 deletion branches/icao/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ android {

buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
2 changes: 1 addition & 1 deletion branches/shc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ android {

buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
2 changes: 1 addition & 1 deletion branches/vc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ android {

buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
Binary file added debug.keystore.jks
Binary file not shown.
26 changes: 26 additions & 0 deletions debug.keystore.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# ---license-start
# eu-digital-green-certificates / dgca-wallet-app-android
# ---
# Copyright (C) 2022 T-Systems International GmbH and all other contributors
# ---
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---license-end
#
# Created by osarapulov on 7/3/22, 12:08 AM
#

storePassword=debug1
keyPassword=debug1
keyAlias=debug1
storeFile=../debug.keystore.jks