diff --git a/android-configs/app-config.gradle b/android-configs/app-config.gradle new file mode 100644 index 0000000..cf6759d --- /dev/null +++ b/android-configs/app-config.gradle @@ -0,0 +1,7 @@ +apply plugin: 'com.android.application' + +apply from: '../RoboSwag/android-configs/common-config.gradle' + +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-android-extensions' +apply plugin: 'kotlin-kapt' diff --git a/android-configs/common-config.gradle b/android-configs/common-config.gradle new file mode 100644 index 0000000..4949440 --- /dev/null +++ b/android-configs/common-config.gradle @@ -0,0 +1,26 @@ +apply plugin: 'kotlin-android' + +rootProject.ext { + compileSdk = 29 + + minSdk = 21 + targetSdk = 29 +} + +android { + compileSdkVersion rootProject.ext.compileSdk + + defaultConfig { + minSdkVersion rootProject.ext.minSdk + targetSdkVersion rootProject.ext.targetSdk + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8.toString() + } +} diff --git a/android-configs/lib-config.gradle b/android-configs/lib-config.gradle new file mode 100644 index 0000000..954df9f --- /dev/null +++ b/android-configs/lib-config.gradle @@ -0,0 +1,3 @@ +apply plugin: 'com.android.library' + +apply from: '../android-configs/common-config.gradle' \ No newline at end of file diff --git a/android-plugins/build.gradle.kts b/android-plugins/build.gradle.kts new file mode 100644 index 0000000..b044b2e --- /dev/null +++ b/android-plugins/build.gradle.kts @@ -0,0 +1,18 @@ +plugins { + `kotlin-dsl` + `kotlin-dsl-precompiled-script-plugins` +} + +repositories { + jcenter() + google() +} + +dependencies { + implementation("com.android.tools.build:gradle:4.0.0") + + implementation("com.android.tools.build:gradle-api:4.0.0") + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61") + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61") + +} diff --git a/android-plugins/src/main/kotlin/plugins/lib-settings.gradle.kts b/android-plugins/src/main/kotlin/plugins/lib-settings.gradle.kts new file mode 100644 index 0000000..016b271 --- /dev/null +++ b/android-plugins/src/main/kotlin/plugins/lib-settings.gradle.kts @@ -0,0 +1,23 @@ +plugins { + id("com.android.application") apply false + id("kotlin-android") + id("kotlin-android-extensions") +} + +android { + compileSdkVersion(29) + + defaultConfig { + minSdkVersion(21) + targetSdkVersion(29) + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8.toString() + } +} diff --git a/android-plugins/src/main/resources/META-INF/gradle-plugins/android_app.properties b/android-plugins/src/main/resources/META-INF/gradle-plugins/android_app.properties new file mode 100644 index 0000000..e5d4100 --- /dev/null +++ b/android-plugins/src/main/resources/META-INF/gradle-plugins/android_app.properties @@ -0,0 +1 @@ +implementation-class=plugins.AndroidAppPlugin diff --git a/api-logansquare/build.gradle b/api-logansquare/build.gradle index c522cc9..46d7270 100644 --- a/api-logansquare/build.gradle +++ b/api-logansquare/build.gradle @@ -1,23 +1,48 @@ -apply plugin: 'com.android.library' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { - api project(":storable") - api 'net.danlew:android.joda:2.9.9.4' + implementation project(":utils") + implementation project(":logging") + implementation project(":storable") - implementation "androidx.annotation:annotation:$versions.androidx" - implementation "com.squareup.retrofit2:retrofit:$versions.retrofit" - implementation 'ru.touchin:logansquare:1.4.3' + implementation 'net.danlew:android.joda' + + implementation "androidx.core:core" + implementation "androidx.annotation:annotation" + + implementation "com.squareup.retrofit2:retrofit" + + implementation 'ru.touchin:logansquare' + + constraints { + implementation("androidx.core:core") { + version { + require '1.0.0' + } + } + + implementation("ru.touchin:logansquare") { + version { + require '1.4.3' + } + } + + implementation("com.squareup.retrofit2:retrofit") { + version { + require '2.7.0' + } + } + + implementation("androidx.annotation:annotation") { + version { + require '1.0.0' + } + } + + implementation("net.danlew:android.joda") { + version { + require '2.9.9.4' + } + } + } } diff --git a/base-map/build.gradle b/base-map/build.gradle index b80165f..28cb33f 100644 --- a/base-map/build.gradle +++ b/base-map/build.gradle @@ -1,15 +1,6 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 17 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" } diff --git a/bottom-navigation-base/build.gradle b/bottom-navigation-base/build.gradle index f97eb55..2d47a0f 100644 --- a/bottom-navigation-base/build.gradle +++ b/bottom-navigation-base/build.gradle @@ -1,31 +1,26 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() - } - -} +apply from: "../android-configs/lib-config.gradle" dependencies { implementation project(":logging") implementation project(":navigation-base") - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation("org.jetbrains.kotlin:kotlin-stdlib") - implementation "androidx.core:core-ktx:$versions.coreKtx" + implementation("androidx.core:core-ktx") - implementation "androidx.appcompat:appcompat:$versions.appcompat" + implementation("androidx.appcompat:appcompat") + + constraints { + implementation("androidx.appcompat:appcompat") { + version { + require '1.0.0' + } + } + + implementation("androidx.core:core-ktx") { + version { + require '1.0.0' + } + } + } } diff --git a/bottom-navigation-fragment/build.gradle b/bottom-navigation-fragment/build.gradle index 69410ca..7be765e 100644 --- a/bottom-navigation-fragment/build.gradle +++ b/bottom-navigation-fragment/build.gradle @@ -1,31 +1,26 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() - } - -} +apply from: "../android-configs/lib-config.gradle" dependencies { implementation project(":navigation-base") implementation project(":bottom-navigation-base") - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation "androidx.core:core-ktx:$versions.coreKtx" + implementation "androidx.core:core-ktx" - implementation "androidx.appcompat:appcompat:$versions.appcompat" + implementation "androidx.appcompat:appcompat" + + constraints { + implementation("androidx.core:core-ktx") { + version { + require '1.0.0' + } + } + + implementation("androidx.appcompat:appcompat") { + version { + require '1.0.0' + } + } + } } diff --git a/bottom-navigation-viewcontroller/build.gradle b/bottom-navigation-viewcontroller/build.gradle index 8a5beda..ab6dfc9 100644 --- a/bottom-navigation-viewcontroller/build.gradle +++ b/bottom-navigation-viewcontroller/build.gradle @@ -1,32 +1,27 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() - } - -} +apply from: "../android-configs/lib-config.gradle" dependencies { implementation project(":navigation-base") implementation project(":navigation-viewcontroller") implementation project(":bottom-navigation-base") - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation "androidx.core:core-ktx:$versions.coreKtx" + implementation "androidx.core:core-ktx" - implementation "androidx.appcompat:appcompat:$versions.appcompat" + implementation "androidx.appcompat:appcompat" + + constraints { + implementation("androidx.core:core-ktx") { + version { + require '1.0.0' + } + } + + implementation("androidx.appcompat:appcompat") { + version { + require '1.0.0' + } + } + } } diff --git a/build.gradle b/build.gradle index 41d4c15..7a61b19 100644 --- a/build.gradle +++ b/build.gradle @@ -5,10 +5,10 @@ buildscript { maven { url "https://plugins.gradle.org/m2/" } } dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' + classpath 'com.android.tools.build:gradle:4.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'de.aaschmid:gradle-cpd-plugin:1.1' - classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.0.0-RC12" + classpath 'de.aaschmid:gradle-cpd-plugin:3.1' + classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.6.0" } } @@ -16,7 +16,13 @@ allprojects { repositories { google() jcenter() - maven { url "http://dl.bintray.com/touchin/touchin-tools" } + maven { + url "https://dl.bintray.com/touchin/touchin-tools" + metadataSources { + artifact() + } + + } } } diff --git a/google-map/build.gradle b/google-map/build.gradle index 7673daa..5dbe162 100644 --- a/google-map/build.gradle +++ b/google-map/build.gradle @@ -1,18 +1,17 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 17 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { api project(":base-map") - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation "com.google.android.gms:play-services-maps:$versions.google_maps" + implementation "com.google.android.gms:play-services-maps" + + constraints { + implementation("com.google.android.gms:play-services-maps") { + version { + require '17.0.0' + } + } + } } diff --git a/kotlin-extensions/build.gradle b/kotlin-extensions/build.gradle index 797cd49..9a33a8e 100644 --- a/kotlin-extensions/build.gradle +++ b/kotlin-extensions/build.gradle @@ -1,16 +1,15 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation "androidx.recyclerview:recyclerview:$versions.androidx" + implementation "androidx.recyclerview:recyclerview" + + constraints { + implementation("androidx.recyclerview:recyclerview") { + version { + require '1.0.0' + } + } + } } diff --git a/lifecycle-rx/build.gradle b/lifecycle-rx/build.gradle index 4d58f46..fb335b2 100644 --- a/lifecycle-rx/build.gradle +++ b/lifecycle-rx/build.gradle @@ -1,25 +1,42 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { api project(":utils") api project(":logging") api project(":lifecycle") - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation "androidx.appcompat:appcompat:$versions.appcompat" + implementation "androidx.appcompat:appcompat" - implementation "androidx.lifecycle:lifecycle-extensions:$versions.lifecycle" + implementation "androidx.lifecycle:lifecycle-extensions" - implementation "io.reactivex.rxjava2:rxjava:$versions.rxJava" - implementation "io.reactivex.rxjava2:rxandroid:$versions.rxAndroid" + implementation "io.reactivex.rxjava2:rxjava" + implementation "io.reactivex.rxjava2:rxandroid" + + constraints { + implementation("androidx.appcompat:appcompat") { + version { + require '1.0.0' + } + } + + implementation("androidx.lifecycle:lifecycle-extensions") { + version { + require '2.1.0' + } + } + + implementation("io.reactivex.rxjava2:rxjava") { + version { + require '2.2.6' + } + } + + implementation("io.reactivex.rxjava2:rxandroid") { + version { + require '2.0.0' + } + } + } } diff --git a/lifecycle-viewcontroller/build.gradle b/lifecycle-viewcontroller/build.gradle index 7ceb229..22d42c4 100644 --- a/lifecycle-viewcontroller/build.gradle +++ b/lifecycle-viewcontroller/build.gradle @@ -1,22 +1,4 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { implementation project(":lifecycle") @@ -24,12 +6,38 @@ dependencies { compileOnly "javax.inject:javax.inject:1" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation "androidx.appcompat:appcompat:$versions.appcompat" + implementation "androidx.appcompat:appcompat" - implementation "androidx.fragment:fragment:$versions.fragment" - implementation "androidx.fragment:fragment-ktx:$versions.fragment" + implementation "androidx.fragment:fragment" + implementation "androidx.fragment:fragment-ktx" - implementation "androidx.lifecycle:lifecycle-extensions:$versions.lifecycle" + implementation "androidx.lifecycle:lifecycle-extensions" + + constraints { + implementation("androidx.appcompat:appcompat") { + version { + require '1.0.0' + } + } + + implementation("androidx.fragment:fragment") { + version { + require '1.1.0' + } + } + + implementation("androidx.fragment:fragment-ktx") { + version { + require '1.1.0' + } + } + + implementation("androidx.lifecycle:lifecycle-extensions") { + version { + require '2.1.0' + } + } + } } diff --git a/lifecycle/build.gradle b/lifecycle/build.gradle index 6ca35ff..6538e89 100644 --- a/lifecycle/build.gradle +++ b/lifecycle/build.gradle @@ -1,32 +1,40 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { compileOnly "javax.inject:javax.inject:1" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation "androidx.appcompat:appcompat:$versions.appcompat" + implementation "androidx.appcompat:appcompat" - implementation "androidx.fragment:fragment:$versions.fragment" - implementation "androidx.fragment:fragment-ktx:$versions.fragment" + implementation "androidx.fragment:fragment" + implementation "androidx.fragment:fragment-ktx" - implementation "androidx.lifecycle:lifecycle-extensions:$versions.lifecycle" + implementation "androidx.lifecycle:lifecycle-extensions" + + constraints { + implementation("androidx.appcompat:appcompat") { + version { + require '1.0.0' + } + } + + implementation("androidx.lifecycle:lifecycle-extensions") { + version { + require '2.1.0' + } + } + + implementation("androidx.fragment:fragment") { + version { + require '1.0.0' + } + } + + implementation("androidx.fragment:fragment-ktx") { + version { + require '1.1.0' + } + } + } } diff --git a/livedata-location/build.gradle b/livedata-location/build.gradle index 297284c..b61b9ce 100644 --- a/livedata-location/build.gradle +++ b/livedata-location/build.gradle @@ -1,19 +1,17 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - -} +apply from: "../android-configs/lib-config.gradle" dependencies { api project(":lifecycle") - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation "com.google.android.gms:play-services-location:$versions.location" + implementation "com.google.android.gms:play-services-location" + + constraints { + implementation("com.google.android.gms:play-services-location") { + version { + require '1.0.0' + } + } + } } diff --git a/logging/build.gradle b/logging/build.gradle index 2b79ac2..1cc7977 100644 --- a/logging/build.gradle +++ b/logging/build.gradle @@ -1,22 +1,21 @@ -apply plugin: 'com.android.library' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { - implementation "androidx.annotation:annotation:$versions.androidx" + implementation "androidx.annotation:annotation" - implementation("com.crashlytics.sdk.android:crashlytics:$versions.crashlytics@aar") { - transitive = true + implementation "com.crashlytics.sdk.android:crashlytics" + + constraints { + implementation("androidx.annotation:annotation") { + version { + require '1.0.0' + } + } + + implementation("com.crashlytics.sdk.android:crashlytics") { + version { + require '2.10.0' + } + } } } diff --git a/navigation-base/build.gradle b/navigation-base/build.gradle index ed356be..e444e8a 100644 --- a/navigation-base/build.gradle +++ b/navigation-base/build.gradle @@ -1,41 +1,61 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' +apply from: "../android-configs/lib-config.gradle" + apply plugin: 'kotlin-kapt' -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() - } - -} - dependencies { implementation project(":utils") implementation project(":logging") - implementation 'androidx.multidex:multidex:2.0.1' + implementation 'androidx.multidex:multidex' - implementation 'net.danlew:android.joda:2.10.2' + implementation 'net.danlew:android.joda' - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation "androidx.appcompat:appcompat:$versions.appcompat" + implementation "androidx.appcompat:appcompat" - implementation "androidx.fragment:fragment:$versions.fragment" - implementation "androidx.fragment:fragment-ktx:$versions.fragment" + implementation "androidx.fragment:fragment" + implementation "androidx.fragment:fragment-ktx" - implementation("com.crashlytics.sdk.android:crashlytics:$versions.crashlytics@aar") { + implementation("com.crashlytics.sdk.android:crashlytics") { transitive = true } + + constraints { + implementation("androidx.multidex:multidex") { + version { + require '2.0.0' + } + } + + implementation("net.danlew:android.joda") { + version { + require '2.10.0' + } + } + + implementation("androidx.appcompat:appcompat") { + version { + require '1.0.0' + } + } + + implementation("androidx.fragment:fragment") { + version { + require '1.1.0' + } + } + + implementation("androidx.fragment:fragment-ktx") { + version { + require '1.1.0' + } + } + + implementation("com.crashlytics.sdk.android:crashlytics") { + version { + require '2.10.0' + } + } + } } diff --git a/navigation-viewcontroller/build.gradle b/navigation-viewcontroller/build.gradle index e40ef52..05bbe39 100644 --- a/navigation-viewcontroller/build.gradle +++ b/navigation-viewcontroller/build.gradle @@ -1,39 +1,45 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' +apply from: "../android-configs/lib-config.gradle" + apply plugin: 'kotlin-kapt' -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() - } - -} - dependencies { implementation project(":utils") implementation project(":logging") implementation project(":navigation-base") - implementation 'androidx.multidex:multidex:2.0.1' + implementation 'androidx.multidex:multidex' - implementation 'net.danlew:android.joda:2.10.2' + implementation 'net.danlew:android.joda' - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation "androidx.appcompat:appcompat:$versions.appcompat" + implementation "androidx.appcompat:appcompat" - implementation("com.crashlytics.sdk.android:crashlytics:$versions.crashlytics@aar") { - transitive = true + implementation("com.crashlytics.sdk.android:crashlytics") + + constraints { + implementation("androidx.multidex:multidex") { + version { + require '2.0.1' + } + } + + implementation("net.danlew:android.joda") { + version { + require '2.10.2' + } + } + + implementation("androidx.appcompat:appcompat") { + version { + require '1.0.2' + } + } + + implementation("com.crashlytics.sdk.android:crashlytics") { + version { + require '2.10.0' + } + } } } diff --git a/recyclerview-adapters/build.gradle b/recyclerview-adapters/build.gradle index f4730f9..f733886 100644 --- a/recyclerview-adapters/build.gradle +++ b/recyclerview-adapters/build.gradle @@ -1,18 +1,17 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { - api project(':kotlin-extensions') + implementation project(':kotlin-extensions') - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation "androidx.recyclerview:recyclerview:$versions.androidx" + implementation "androidx.recyclerview:recyclerview" + + constraints { + implementation("androidx.recyclerview:recyclerview") { + version { + require '1.0.0' + } + } + } } diff --git a/recyclerview-calendar/build.gradle b/recyclerview-calendar/build.gradle index 09ee166..811a091 100644 --- a/recyclerview-calendar/build.gradle +++ b/recyclerview-calendar/build.gradle @@ -1,16 +1,22 @@ -apply plugin: 'com.android.library' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { - api project(":logging") - api 'net.danlew:android.joda:2.9.9.4' + implementation project(":logging") + implementation 'net.danlew:android.joda' - implementation "androidx.recyclerview:recyclerview:$versions.androidx" + implementation "androidx.recyclerview:recyclerview" + + constraints { + implementation("androidx.recyclerview:recyclerview") { + version { + require '1.0.0' + } + } + + implementation("net.danlew:android.joda") { + version { + require '2.9.9.4' + } + } + } } diff --git a/rx-extensions/build.gradle b/rx-extensions/build.gradle index 14da026..bb4e059 100644 --- a/rx-extensions/build.gradle +++ b/rx-extensions/build.gradle @@ -1,18 +1,17 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { - api project(":utils") - api project(":logging") + implementation project(":utils") + implementation project(":logging") - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation "io.reactivex.rxjava2:rxjava:$versions.rxJava" + implementation "org.jetbrains.kotlin:kotlin-stdlib" + implementation "io.reactivex.rxjava2:rxjava" + + constraints { + implementation("io.reactivex.rxjava2:rxjava") { + version { + require '2.2.9' + } + } + } } diff --git a/storable/build.gradle b/storable/build.gradle index 340a921..58f4456 100644 --- a/storable/build.gradle +++ b/storable/build.gradle @@ -1,25 +1,38 @@ -apply plugin: 'com.android.library' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { - api project(":utils") - api project(":logging") + implementation project(":utils") + implementation project(":logging") - implementation "androidx.core:core:$versions.androidx" - implementation "androidx.annotation:annotation:$versions.androidx" + implementation "androidx.core:core" + implementation "androidx.annotation:annotation" - implementation "io.reactivex.rxjava2:rxjava:$versions.rxJava" - implementation "io.reactivex.rxjava2:rxandroid:$versions.rxAndroid" + implementation "io.reactivex.rxjava2:rxjava" + implementation "io.reactivex.rxjava2:rxandroid" + + constraints { + implementation("androidx.core:core") { + version { + require '1.0.0' + } + } + + implementation("androidx.annotation:annotation") { + version { + require '1.0.0' + } + } + + implementation("io.reactivex.rxjava2:rxjava") { + version { + require '2.2.6' + } + } + + implementation("io.reactivex.rxjava2:rxandroid") { + version { + require '2.1.1' + } + } + } } diff --git a/utils/build.gradle b/utils/build.gradle index ac3a82f..f8763bd 100644 --- a/utils/build.gradle +++ b/utils/build.gradle @@ -1,21 +1,21 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { - implementation "androidx.core:core:$versions.androidx" - implementation "androidx.annotation:annotation:$versions.androidx" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "androidx.core:core" + implementation "androidx.annotation:annotation" + implementation "org.jetbrains.kotlin:kotlin-stdlib" + + constraints { + implementation("androidx.core:core") { + version { + require '1.0.0' + } + } + + implementation("androidx.annotation:annotation") { + version { + require '1.1.0' + } + } + } } diff --git a/views/build.gradle b/views/build.gradle index 7f190bd..623cb8b 100644 --- a/views/build.gradle +++ b/views/build.gradle @@ -1,21 +1,16 @@ -apply plugin: 'com.android.library' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 16 - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { - api project(":utils") - api project(":logging") + implementation project(":utils") + implementation project(":logging") - implementation "com.google.android.material:material:$versions.material" + implementation "com.google.android.material:material" + + constraints { + implementation("com.google.android.material:material") { + version { + require '1.0.0' + } + } + } } diff --git a/yandex-map/build.gradle b/yandex-map/build.gradle index e34fbaf..88830e4 100644 --- a/yandex-map/build.gradle +++ b/yandex-map/build.gradle @@ -1,18 +1,17 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion versions.compileSdk - - defaultConfig { - minSdkVersion 17 - } -} +apply from: "../android-configs/lib-config.gradle" dependencies { - api project(":base-map") + implementation project(":base-map") - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation "com.yandex.android:mapkit:$versions.yandex_mapkit" + implementation "com.yandex.android:mapkit" + + constraints { + implementation("com.yandex.android:mapkit") { + version { + require '3.4.0' + } + } + } }