Merge pull request #13 from lucasnlm/improve-versions

Improve versions handling
This commit is contained in:
Lucas Nunes 2020-03-10 23:37:10 -03:00 committed by GitHub
commit b6105e4a4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 137 additions and 88 deletions

View file

@ -5,15 +5,15 @@ apply plugin: 'io.fabric'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 29
compileSdkVersion buildVersion.targetSdk
defaultConfig {
applicationId 'dev.lucasnlm.antimine'
minSdkVersion 16
targetSdkVersion 29
applicationId buildVersion.applicationId
minSdkVersion buildVersion.minAppSdk
targetSdkVersion buildVersion.targetSdk
versionCode buildVersion.versionCode
versionName buildVersion.versionName
multiDexEnabled true
versionCode 59
versionName '6.1.3'
vectorDrawables.useSupportLibrary true
resConfigs 'en', 'pt', 'es', 'zh'
@ -40,29 +40,27 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':common')
// Android
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.multidex:multidex:2.0.1'
// AndroidX
implementation "androidx.appcompat:appcompat:$versions.appcompat"
implementation "androidx.preference:preference:$versions.preference"
implementation "androidx.recyclerview:recyclerview:$versions.recyclerview"
implementation "androidx.multidex:multidex:$versions.multiDex"
// Constraint
implementation "androidx.constraintlayout:constraintlayout:$versions.constraintlayout"
// Google
implementation 'com.google.android.gms:play-services-instantapps:17.0.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'com.google.android.play:core:1.6.5'
implementation "com.google.android.gms:play-services-instantapps:$versions.instantApp"
implementation "com.google.android.material:material:$versions.material"
implementation "com.google.android.play:core:$versions.playCore"
// Dagger
def dagger_version='2.21'
api "com.google.dagger:dagger-android:$dagger_version"
api "com.google.dagger:dagger-android-support:$dagger_version"
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
api "com.google.dagger:dagger-android:$versions.dagger"
api "com.google.dagger:dagger-android-support:$versions.dagger"
kapt "com.google.dagger:dagger-android-processor:$versions.dagger"
kapt "com.google.dagger:dagger-compiler:$versions.dagger"
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true
}
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50'
// Kotlin
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutines"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
}

View file

@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.3.50'
buildscript {
apply from: 'config.gradle'
repositories {
mavenCentral()
@ -17,11 +17,11 @@ buildscript {
// noinspection GradleDynamicVersion
classpath 'io.fabric.tools:gradle:1.+'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" }
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
}
}
allprojects {

View file

@ -4,15 +4,15 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 29
compileSdkVersion buildVersion.targetSdk
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
versionCode 59
versionName '6.1.3'
minSdkVersion buildVersion.minAppSdk
targetSdkVersion buildVersion.targetSdk
versionCode buildVersion.versionCode
versionName buildVersion.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
kapt {
@ -24,56 +24,54 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// AndroidX
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "androidx.appcompat:appcompat:$versions.appcompat"
implementation "androidx.preference:preference:$versions.preference"
implementation "androidx.recyclerview:recyclerview:$versions.recyclerview"
// Constraint
implementation "androidx.constraintlayout:constraintlayout:$versions.constraintlayout"
// Lifecycle
api 'android.arch.lifecycle:extensions:1.1.1'
implementation "android.arch.lifecycle:viewmodel:1.1.1"
api "android.arch.lifecycle:extensions:$versions.lifecycle"
implementation "android.arch.lifecycle:viewmodel:$versions.lifecycle"
// Amplitude
implementation 'com.amplitude:android-sdk:2.23.2'
implementation "com.amplitude:android-sdk:$versions.amplitude"
// Dagger
def dagger_version='2.21'
api "com.google.dagger:dagger-android:$dagger_version"
api "com.google.dagger:dagger-android-support:$dagger_version"
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
api "com.google.dagger:dagger-android:$versions.dagger"
api "com.google.dagger:dagger-android-support:$versions.dagger"
kapt "com.google.dagger:dagger-android-processor:$versions.dagger"
kapt "com.google.dagger:dagger-compiler:$versions.dagger"
// Room
def room_version = '2.2.3'
api "androidx.room:room-runtime:$room_version"
api "androidx.room:room-ktx:$room_version"
kapt "androidx.room:room-compiler:$room_version"
testImplementation "androidx.room:room-testing:$room_version"
api "androidx.room:room-runtime:$versions.room"
api "androidx.room:room-ktx:$versions.room"
kapt "androidx.room:room-compiler:$versions.room"
testImplementation "androidx.room:room-testing:$versions.room"
// Moshi - Json
def moshi_version = '1.9.1'
api "com.squareup.moshi:moshi:$moshi_version"
api "com.squareup.moshi:moshi-kotlin:$moshi_version"
kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshi_version"
api "com.squareup.moshi:moshi:$versions.moshi"
api "com.squareup.moshi:moshi-kotlin:$versions.moshi"
kapt "com.squareup.moshi:moshi-kotlin-codegen:$versions.moshi"
// Coroutines
def coroutines_version = '1.3.0'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$versions.coroutines"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutines"
// Kotlin Lib
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
// Unit Tests
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.24.0'
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0'
testImplementation "junit:junit:$versions.junit"
testImplementation "org.mockito:mockito-core:$versions.mockito"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$versions.mockitoKotlin"
// Core library
androidTestImplementation 'androidx.test:core:1.2.0'
androidTestImplementation "androidx.test:core:$versions.testCore"
// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
androidTestUtil 'androidx.test:orchestrator:1.2.0'
androidTestImplementation "androidx.test:runner:$versions.testCore"
androidTestImplementation "androidx.test:rules:$versions.testCore"
androidTestUtil "androidx.test:orchestrator:$versions.testCore"
}

51
config.gradle Normal file
View file

@ -0,0 +1,51 @@
ext.buildVersion = [
versionCode : 59,
versionName : '6.1.4',
targetSdk : 29,
minAppSdk : 16,
wearMinAppSdk: 23,
applicationId: 'dev.lucasnlm.antimine'
]
ext.versions = [
android : '3.5.2',
// Android
appcompat : '1.1.0',
preference : '1.1.0',
recyclerview : '1.1.0',
constraintlayout: '1.1.3',
multiDex : '2.0.1',
legacySupport : '1.0.0',
// Wear OS
wear : '1.0.0',
// Google Weae
playWearable : '17.0.0',
supportWearable : '2.5.0',
// Google
instantApp : '17.0.0',
material : '1.1.0',
playCore : '1.6.5',
// Kotlin
kotlin : '1.3.50',
coroutines : '1.3.4',
// Jetpack
lifecycle : '1.1.1',
room : '2.2.4',
// Third Party
amplitude : '2.23.2',
dagger : '2.21',
moshi : '1.9.1',
// Testing
junit : '4.12',
mockito : '2.24.0',
mockitoKotlin : '2.1.0',
testCore : '1.2.0'
]

View file

@ -5,14 +5,14 @@ apply plugin: 'kotlin-kapt'
android {
publishNonDefault true
compileSdkVersion 29
compileSdkVersion buildVersion.targetSdk
defaultConfig {
applicationId 'dev.lucasnlm.antimine.wear'
minSdkVersion 23
targetSdkVersion 29
versionCode 59
versionName '6.1.3'
minSdkVersion buildVersion.wearMinAppSdk
targetSdkVersion buildVersion.targetSdk
versionCode buildVersion.versionCode
versionName buildVersion.versionName
resConfigs 'en', 'pt', 'es', 'zh'
}
@ -29,24 +29,26 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':common')
// Android X
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
// Constraint
implementation "androidx.appcompat:appcompat:$versions.appcompat"
implementation "androidx.constraintlayout:constraintlayout:$versions.constraintlayout"
implementation "androidx.recyclerview:recyclerview:$versions.recyclerview"
implementation "androidx.legacy:legacy-support-v4:$versions.legacySupport"
// Wear OS
implementation 'androidx.wear:wear:1.0.0'
implementation "com.google.android.gms:play-services-wearable:17.0.0"
implementation 'com.google.android.support:wearable:2.5.0'
compileOnly 'com.google.android.wearable:wearable:2.5.0'
implementation "androidx.wear:wear:$versions.wear"
implementation "com.google.android.gms:play-services-wearable:$versions.playWearable"
implementation "com.google.android.support:wearable:$versions.supportWearable"
compileOnly "com.google.android.wearable:wearable:$versions.supportWearable"
// Dagger
def dagger_version='2.21'
api "com.google.dagger:dagger-android:$dagger_version"
api "com.google.dagger:dagger-android-support:$dagger_version"
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
api "com.google.dagger:dagger-android:$versions.dagger"
api "com.google.dagger:dagger-android-support:$versions.dagger"
kapt "com.google.dagger:dagger-android-processor:$versions.dagger"
kapt "com.google.dagger:dagger-compiler:$versions.dagger"
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50'
// Kotlin
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutines"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
}