Adding config for alpha and beta build #13

Merged
mathieu merged 1 commits from adding-config-alpha-beta into master 2020-04-29 21:49:10 +00:00
4 changed files with 37 additions and 7 deletions

View File

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

View File

@ -88,7 +88,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
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>
@ -163,7 +165,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
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>

View File

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<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_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>

View File

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