Merge pull request #56 from lucasnlm/fix-fdroid-support

Remove gradle.versions to support F-droid
This commit is contained in:
Lucas Nunes 2020-04-20 10:01:45 -03:00 committed by GitHub
commit 639234da71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 106 additions and 155 deletions

View file

@ -4,15 +4,15 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion buildVersion.targetSdk
compileSdkVersion 29
defaultConfig {
// versionCode and versionName must be hardcoded to support F-droid
versionCode 603011
versionName '6.3.1'
applicationId buildVersion.applicationId
minSdkVersion buildVersion.minAppSdk
targetSdkVersion buildVersion.targetSdk
versionCode 603021
versionName '6.3.2'
applicationId 'dev.lucanlm.antimine'
minSdkVersion 16
targetSdkVersion 29
multiDexEnabled true
vectorDrawables.useSupportLibrary true
resConfigs 'en', 'cs', 'de', 'es', 'fr', 'pt', 'ru', 'tr', 'vi', 'uk', 'zh'
@ -46,19 +46,21 @@ android {
}
}
flavorDimensions "version"
flavorDimensions 'version'
productFlavors {
google {
dimension "version"
dimension 'version'
}
foss {
dimension "version"
dimension 'version'
}
}
}
dependencies {
// Dependencies must be hardcoded to support F-droid
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':common')
@ -66,37 +68,36 @@ dependencies {
fossImplementation project(':foss')
// 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"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.multidex:multidex:2.0.1'
// Constraint
implementation "androidx.constraintlayout:constraintlayout:$versions.constraintlayout"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
// Google
implementation "com.google.android.material:material:$versions.material"
implementation 'com.google.android.material:material:1.1.0'
// Dagger
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"
testImplementation "com.google.dagger:dagger-android:$versions.dagger"
testImplementation "com.google.dagger:dagger-android-support:$versions.dagger"
api 'com.google.dagger:dagger-android:2.21'
api 'com.google.dagger:dagger-android-support:2.21'
kapt 'com.google.dagger:dagger-android-processor:2.21'
kapt 'com.google.dagger:dagger-compiler:2.21'
testImplementation 'com.google.dagger:dagger-android:2.21'
testImplementation 'com.google.dagger:dagger-android-support:2.21'
// Kotlin
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutines"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$versions.coroutines"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.5'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.5'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.5'
// Tests
testImplementation "junit:junit:$versions.junit"
testImplementation "androidx.test:core:$versions.testCore"
testImplementation "androidx.test:core-ktx:$versions.testCore"
testImplementation "androidx.test.espresso:espresso-core:$versions.espresso"
testImplementation "androidx.test.espresso:espresso-contrib:$versions.espresso"
testImplementation "androidx.fragment:fragment-testing:$versions.fragmentTest"
testImplementation "org.robolectric:robolectric:$versions.robolectric"
testImplementation 'junit:junit:4.12'
testImplementation 'androidx.test:core:1.2.0'
testImplementation 'androidx.test:core-ktx:1.2.0'
testImplementation 'androidx.test.espresso:espresso-core:3.2.0'
testImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
testImplementation 'androidx.fragment:fragment-testing:1.1.0'
testImplementation 'org.robolectric:robolectric:4.3.1'
}

View file

@ -1,6 +1,4 @@
buildscript {
apply from: 'config.gradle'
repositories {
mavenCentral()
jcenter()
@ -8,11 +6,11 @@ buildscript {
}
dependencies {
classpath "com.android.tools.build:gradle:$versions.android"
classpath 'com.android.tools.build:gradle:3.6.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.71'
}
}
@ -20,10 +18,6 @@ allprojects {
repositories {
google()
jcenter()
maven {
url 'https://jitpack.io'
}
}
}

View file

@ -4,67 +4,69 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion buildVersion.targetSdk
compileSdkVersion 29
defaultConfig {
// versionCode and versionName must be hardcoded to support F-droid
versionCode 603011
versionName '6.3.1'
minSdkVersion buildVersion.minAppSdk
targetSdkVersion buildVersion.targetSdk
versionCode 603021
versionName '6.3.2'
minSdkVersion 16
targetSdkVersion 29
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
}
dependencies {
// Dependencies must be hardcoded to support F-droid
implementation fileTree(dir: 'libs', include: ['*.jar'])
// AndroidX
implementation "androidx.appcompat:appcompat:$versions.appcompat"
implementation "androidx.preference:preference:$versions.preference"
implementation "androidx.recyclerview:recyclerview:$versions.recyclerview"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
// Constraint
implementation "androidx.constraintlayout:constraintlayout:$versions.constraintlayout"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
// Lifecycle
api "android.arch.lifecycle:extensions:$versions.lifecycle"
implementation "android.arch.lifecycle:viewmodel:$versions.lifecycle"
api 'android.arch.lifecycle:extensions:1.1.1'
implementation 'android.arch.lifecycle:viewmodel:1.1.1'
// Dagger
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"
api 'com.google.dagger:dagger-android:2.21'
api 'com.google.dagger:dagger-android-support:2.21'
kapt 'com.google.dagger:dagger-android-processor:2.21'
kapt 'com.google.dagger:dagger-compiler:2.21'
// Room
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"
api 'androidx.room:room-runtime:2.2.5'
api 'androidx.room:room-ktx:2.2.5'
kapt 'androidx.room:room-compiler:2.2.5'
testImplementation 'androidx.room:room-testing:2.2.5'
// Moshi - Json
api "com.squareup.moshi:moshi:$versions.moshi"
api "com.squareup.moshi:moshi-kotlin:$versions.moshi"
kapt "com.squareup.moshi:moshi-kotlin-codegen:$versions.moshi"
api 'com.squareup.moshi:moshi:1.9.1'
api 'com.squareup.moshi:moshi-kotlin:1.9.1'
kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.9.1'
// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$versions.coroutines"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutines"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.5'
// Kotlin Lib
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.71'
// Unit Tests
testImplementation "junit:junit:$versions.junit"
testImplementation "org.mockito:mockito-core:$versions.mockito"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$versions.mockitoKotlin"
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.24.0'
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0'
// Core library
androidTestImplementation "androidx.test:core:$versions.testCore"
androidTestImplementation 'androidx.test:core:1.2.0'
// AndroidJUnitRunner and JUnit Rules
androidTestImplementation "androidx.test:runner:$versions.testCore"
androidTestImplementation "androidx.test:rules:$versions.testCore"
androidTestUtil "androidx.test:orchestrator:$versions.testCore"
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
androidTestUtil 'androidx.test:orchestrator:1.2.0'
}

View file

@ -1,52 +0,0 @@
ext.buildVersion = [
versionCode : 603011, // MMmmPPv
versionName : '6.3.1',
targetSdk : 29,
minAppSdk : 16,
wearMinAppSdk: 23,
applicationId: 'com.logical.minato'
]
ext.versions = [
android : '3.6.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 Wear
playWearable : '17.0.0',
supportWearable : '2.5.0',
// Google
instantApp : '17.0.0',
material : '1.1.0',
// Kotlin
kotlin : '1.3.71',
coroutines : '1.3.5',
// Jetpack
lifecycle : '1.1.1',
room : '2.2.5',
// Third Party
dagger : '2.21',
moshi : '1.9.1',
// Testing
junit : '4.12',
mockito : '2.24.0',
mockitoKotlin : '2.1.0',
testCore : '1.2.0',
espresso : '3.2.0',
fragmentTest : '1.1.0',
robolectric : '4.3.1'
]

View file

@ -3,13 +3,13 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion buildVersion.targetSdk
compileSdkVersion 29
defaultConfig {
versionCode 603011 // MMmmPPv
versionName '6.3.1'
minSdkVersion buildVersion.minAppSdk
targetSdkVersion buildVersion.targetSdk
versionCode 603021 // MMmmPPv
versionName '6.3.2'
minSdkVersion 16
targetSdkVersion 29
resConfigs 'en', 'cs', 'de', 'es', 'fr', 'pt', 'ru', 'tr', 'vi', 'uk', 'zh'
}
@ -22,5 +22,7 @@ android {
}
dependencies {
// Dependencies must be hardcoded to support F-droid
implementation fileTree(dir: 'libs', include: ['*.jar'])
}

View file

@ -3,13 +3,13 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion buildVersion.targetSdk
compileSdkVersion 29
defaultConfig {
minSdkVersion buildVersion.minAppSdk
targetSdkVersion buildVersion.targetSdk
versionCode buildVersion.versionCode
versionName buildVersion.versionName
versionCode 603021 // MMmmPPv
versionName '6.3.2'
minSdkVersion 16
targetSdkVersion 29
resConfigs 'en', 'cs', 'de', 'es', 'fr', 'pt', 'ru', 'tr', 'vi', 'uk', 'zh'
}
@ -22,8 +22,10 @@ android {
}
dependencies {
// Dependencies must be hardcoded to support F-droid
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Google
implementation "com.google.android.gms:play-services-instantapps:$versions.instantApp"
implementation 'com.google.android.gms:play-services-instantapps:17.0.0'
}

View file

@ -5,15 +5,15 @@ apply plugin: 'kotlin-kapt'
android {
publishNonDefault true
compileSdkVersion buildVersion.targetSdk
compileSdkVersion 29
defaultConfig {
// versionCode and versionName must be hardcoded to support F-droid
versionCode 603011
versionName '6.3.1'
applicationId buildVersion.applicationId
minSdkVersion buildVersion.wearMinAppSdk
targetSdkVersion buildVersion.targetSdk
versionCode 603021
versionName '6.3.2'
applicationId 'dev.lucasnlm.antimine'
minSdkVersion 23
targetSdkVersion 29
vectorDrawables.useSupportLibrary true
resConfigs 'en', 'cs', 'de', 'es', 'fr', 'pt', 'ru', 'tr', 'vi', 'uk', 'zh'
}
@ -27,29 +27,31 @@ android {
}
dependencies {
// Dependencies must be hardcoded to support F-droid
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':common')
// 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"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
// Wear OS
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"
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'
// Dagger
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"
api 'com.google.dagger:dagger-android:2.21'
api 'com.google.dagger:dagger-android-support:2.21'
kapt 'com.google.dagger:dagger-android-processor:2.21'
kapt 'com.google.dagger:dagger-compiler:2.21'
// Kotlin
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutines"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.5'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.5'
}