diff --git a/.idea/misc.xml b/.idea/misc.xml index af0bbdd..703e5d4 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,7 +5,7 @@ - + diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index dd74f00..08fedf8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,10 +2,13 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' +apply plugin: 'kotlin-kapt' + apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 28 + dataBinding.enabled = true defaultConfig { applicationId "com.rootstrap.android" minSdkVersion 15 @@ -14,20 +17,90 @@ android { versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } + + buildTypes { + debug { + } + release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + + applicationVariants.all { variant -> } } + + flavorDimensions "api" + + productFlavors { + + dev { + dimension "api" + applicationIdSuffix ".dev" + versionNameSuffix "-dev" + buildConfigField("String", "API_URL", "\"https://dev.com/api/\"") + } + + staging { + dimension "api" + applicationIdSuffix ".staging" + versionNameSuffix "-staging" + buildConfigField("String", "API_URL", "\"https://staging.com/api/\"") + } + + prod { + dimension "api" + applicationIdSuffix ".prod" + versionNameSuffix "-prod" + buildConfigField("String", "API_URL", "\"https://prod.com/api/\"") + } + } + + applicationVariants.all { variant -> + variant.outputs.all { output -> + def apk = output.outputFile + def newName = apk.name.replace(".apk", "-v" + variant.versionName + ".apk") + newName = newName.replace("-" + variant.buildType.name, "") + + outputFileName = new File("./apks/" + newName) + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } } dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation fileTree(include: ['*.jar'], dir: 'libs') + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + //---- ANDROID SUPPORT implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.android.support:cardview-v7:28.0.0' + implementation 'com.android.support:design:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' - testImplementation 'junit:junit:4.12' + //---- TEST androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} + testImplementation 'junit:junit:4.12' + //---ANDROID ARCH ROOM + implementation 'android.arch.persistence.room:runtime:1.1.1' + kapt "android.arch.persistence.room:compiler:1.1.1" + //---ANDROID ARCH LIFECYCLE + implementation 'android.arch.lifecycle:common-java8:1.1.1' + kapt "android.arch.lifecycle:compiler:1.1.1" + implementation 'android.arch.lifecycle:runtime:1.1.1' + implementation 'android.arch.lifecycle:extensions:1.1.1' + //---RETROFIT HTTP REST API REQUESTS + implementation 'com.squareup.retrofit2:retrofit:2.4.0' + implementation 'com.squareup.retrofit2:converter-gson:2.4.0' + implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0' + implementation 'com.squareup.okhttp3:okhttp:3.10.0' + //---GOOGLE JSON SERIALIZER/DESERIALIZER + implementation 'com.google.code.gson:gson:2.8.5' + //---BETTER TIME HANDLING + implementation 'net.danlew:android.joda:2.9.9.1' + //---IMAGES + implementation 'com.squareup.picasso:picasso:2.71828' +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 3b61f16..8538a6b 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ allprojects { repositories { google() jcenter() - + maven { url 'https://jitpack.io' } } }