Adding config for alpha and beta build #11

Merged
mathieu merged 1 commits from adding-config-alpha-beta into alpha 2020-04-29 21:48:33 +00:00
4 changed files with 37 additions and 7 deletions
Showing only changes of commit f052470700 - Show all commits

View File

@ -30,11 +30,28 @@ android {
minifyEnabled true minifyEnabled true
shrinkResources true shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "Integer", "DB_VERSION", "1" buildConfigField "Integer", "DB_VERSION", db_version
buildConfigField "Boolean", "TEST", "false" buildConfigField "Boolean", "TEST", "false"
} }
beta {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "Integer", "DB_VERSION", db_version
buildConfigField "Boolean", "TEST", "false"
}
alpha {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "Integer", "DB_VERSION", db_version
buildConfigField "Boolean", "TEST", "true"
}
debug { debug {
buildConfigField "Integer", "DB_VERSION", "1" buildConfigField "Integer", "DB_VERSION", db_version
buildConfigField "Boolean", "TEST", "true" buildConfigField "Boolean", "TEST", "true"
} }
} }
@ -89,6 +106,8 @@ dependencies {
//noinspection GradleDependency //noinspection GradleDependency
implementation 'com.journeyapps:zxing-android-embedded:3.6.0' implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
implementation 'com.github.Ilhasoft:data-binding-validator:2.0.0'
// Test // Test
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.ext:junit:1.1.1'

View File

@ -88,7 +88,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="date" android:inputType="date"
android:text="@={viewModel.birthday}" /> android:text="@={viewModel.birthday}"
app:validateDate='@{"dd/MM/yyyy"}'
app:validateDateMessage="@{@string/date_error_message}"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -163,7 +165,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="date" android:inputType="date"
android:text="@={viewModel.exitDate}" /> android:text="@={viewModel.exitDate}"
app:validateDate='@{"dd/MM/yyyy"}'
app:validateDateMessage="@{@string/date_error_message}"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

View File

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- Validator -->
<string name="date_error_message">Votre date doit être au format 01/01/1970</string>
<string name="error_cannot_create_attestation">Erreur lors de la génération de l\'attestation, tout les champs ne sont pas compléter</string> <string name="error_cannot_create_attestation">Erreur lors de la génération de l\'attestation, tout les champs ne sont pas compléter</string>
<string name="error_failed_create_pdf">Erreur lors de la génération de l\'attestion, veuillez vérifiez vos champs ou contacter le développeur.</string> <string name="error_failed_create_pdf">Erreur lors de la génération de l\'attestion, veuillez vérifiez vos champs ou contacter le développeur.</string>
</resources> </resources>

View File

@ -1,7 +1,12 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.3.72' ext {
kotlin_version = '1.3.72'
db_version = '1'
}
repositories { repositories {
google() google()
jcenter() jcenter()
@ -20,7 +25,7 @@ allprojects {
repositories { repositories {
google() google()
jcenter() jcenter()
maven { url 'https://jitpack.io' }
} }
} }