diff --git a/buildSrc/src/main/kotlin/AndroidConfig.kt b/buildSrc/src/main/kotlin/AndroidConfig.kt new file mode 100644 index 000000000..333d28a2c --- /dev/null +++ b/buildSrc/src/main/kotlin/AndroidConfig.kt @@ -0,0 +1,6 @@ +object AndroidConfig { + const val compileSdk = 27 + const val minSdk = 16 + const val targetSdk = 27 + const val buildTools = "29.0.3" +} diff --git a/buildSrc/src/main/kotlin/Deps.kt b/buildSrc/src/main/kotlin/Deps.kt index efa5fb004..eb07604ff 100644 --- a/buildSrc/src/main/kotlin/Deps.kt +++ b/buildSrc/src/main/kotlin/Deps.kt @@ -3,4 +3,7 @@ object Deps { const val version = "1.3.72" const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version" } + + const val jsoup = "org.jsoup:jsoup:1.13.1" + const val okhttp = "com.squareup.okhttp3:okhttp:3.10.0" } diff --git a/lib/dataimage/build.gradle b/lib/dataimage/build.gradle deleted file mode 100644 index 3fdb185de..000000000 --- a/lib/dataimage/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 27 - buildToolsVersion '29.0.3' - - defaultConfig { - minSdkVersion 16 - targetSdkVersion 27 - versionCode 1 - versionName '1.0.0' - } - - buildTypes { - release { - minifyEnabled false - } - } -} - -repositories { - mavenCentral() -} - -dependencies { - compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - compileOnly 'com.squareup.okhttp3:okhttp:3.10.0' - compileOnly 'org.jsoup:jsoup:1.13.1' -} diff --git a/lib/dataimage/build.gradle.kts b/lib/dataimage/build.gradle.kts new file mode 100644 index 000000000..daaf6620e --- /dev/null +++ b/lib/dataimage/build.gradle.kts @@ -0,0 +1,24 @@ +plugins { + id("com.android.library") + kotlin("android") +} + +android { + compileSdkVersion(AndroidConfig.compileSdk) + buildToolsVersion(AndroidConfig.buildTools) + + defaultConfig { + minSdkVersion(AndroidConfig.minSdk) + targetSdkVersion(AndroidConfig.targetSdk) + } +} + +repositories { + mavenCentral() +} + +dependencies { + compileOnly(Deps.kotlin.stdlib) + compileOnly(Deps.okhttp) + compileOnly(Deps.jsoup) +} diff --git a/lib/ratelimit/build.gradle b/lib/ratelimit/build.gradle deleted file mode 100644 index 5d28d5751..000000000 --- a/lib/ratelimit/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 27 - buildToolsVersion '29.0.3' - - defaultConfig { - minSdkVersion 16 - targetSdkVersion 27 - versionCode 1 - versionName '1.0.0' - } - - buildTypes { - release { - minifyEnabled false - } - } -} - -repositories { - mavenCentral() -} - -dependencies { - compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - compileOnly 'com.squareup.okhttp3:okhttp:3.10.0' -} diff --git a/lib/ratelimit/build.gradle.kts b/lib/ratelimit/build.gradle.kts new file mode 100644 index 000000000..6d467bbd0 --- /dev/null +++ b/lib/ratelimit/build.gradle.kts @@ -0,0 +1,23 @@ +plugins { + id("com.android.library") + kotlin("android") +} + +android { + compileSdkVersion(AndroidConfig.compileSdk) + buildToolsVersion(AndroidConfig.buildTools) + + defaultConfig { + minSdkVersion(AndroidConfig.minSdk) + targetSdkVersion(AndroidConfig.targetSdk) + } +} + +repositories { + mavenCentral() +} + +dependencies { + compileOnly(Deps.kotlin.stdlib) + compileOnly(Deps.okhttp) +}