From 2b2601aa4ab288300b743062d65ca962c4f10b95 Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Fri, 2 Apr 2021 03:14:40 +0430 Subject: [PATCH] move coroutines to root --- AndroidCompat/build.gradle.kts | 5 ----- build.gradle.kts | 21 ++++++++------------- server/build.gradle.kts | 29 ++++++++++++----------------- 3 files changed, 20 insertions(+), 35 deletions(-) diff --git a/AndroidCompat/build.gradle.kts b/AndroidCompat/build.gradle.kts index dfab9851..d56ed384 100644 --- a/AndroidCompat/build.gradle.kts +++ b/AndroidCompat/build.gradle.kts @@ -30,11 +30,6 @@ dependencies { // Javassist compileOnly( "org.javassist:javassist:3.27.0-GA") - // Coroutines - val kotlinx_coroutines_version = "1.4.2" - compileOnly( "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_coroutines_version") - compileOnly( "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$kotlinx_coroutines_version") - // XML compileOnly( group= "xmlpull", name= "xmlpull", version= "1.1.3.1") diff --git a/build.gradle.kts b/build.gradle.kts index c20685e9..80132a3c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,13 +21,13 @@ allprojects { } } -val javaProjects = listOf( +val projects = listOf( project(":AndroidCompat"), project(":AndroidCompat:Config"), project(":server") ) -configure(javaProjects) { +configure(projects) { apply(plugin = "java") apply(plugin = "org.jetbrains.kotlin.jvm") @@ -46,17 +46,15 @@ configure(javaProjects) { // Kotlin implementation(kotlin("stdlib", KotlinCompilerVersion.VERSION)) implementation(kotlin("stdlib", KotlinCompilerVersion.VERSION)) + implementation(kotlin("reflect", version = "1.4.21")) testImplementation(kotlin("test", version = "1.4.21")) - } -} -configure(listOf( - project(":AndroidCompat"), - project(":server"), - project(":AndroidCompat:Config") + // coroutines + val coroutinesVersion = "1.4.2" + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutinesVersion") + -)) { - dependencies { // Dependency Injection implementation("org.kodein.di:kodein-di-conf-jvm:7.1.0") @@ -72,14 +70,11 @@ configure(listOf( // JSoup implementation("org.jsoup:jsoup:1.13.1") - // Kotlin - implementation(kotlin("reflect", version = "1.4.21")) // dependency of :AndroidCompat:Config implementation("com.typesafe:config:1.4.0") implementation("io.github.config4k:config4k:0.4.2") - // to get application content root implementation("net.harawata:appdirs:1.2.0") } diff --git a/server/build.gradle.kts b/server/build.gradle.kts index 8cfe4c37..27cae38a 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -30,19 +30,19 @@ dependencies { implementation("com.github.inorichi.injekt:injekt-core:65b0440") - val okhttp_version = "4.10.0-RC1" - implementation("com.squareup.okhttp3:okhttp:$okhttp_version") - implementation("com.squareup.okhttp3:logging-interceptor:$okhttp_version") - implementation("com.squareup.okhttp3:okhttp-dnsoverhttps:$okhttp_version") + val okhttpVersion = "4.10.0-RC1" + implementation("com.squareup.okhttp3:okhttp:$okhttpVersion") + implementation("com.squareup.okhttp3:logging-interceptor:$okhttpVersion") + implementation("com.squareup.okhttp3:okhttp-dnsoverhttps:$okhttpVersion") implementation("com.squareup.okio:okio:2.9.0") // retrofit - val retrofit_version = "2.9.0" - implementation("com.squareup.retrofit2:retrofit:$retrofit_version") + val retrofitVersion = "2.9.0" + implementation("com.squareup.retrofit2:retrofit:$retrofitVersion") implementation("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.8.0") - implementation("com.squareup.retrofit2:converter-gson:$retrofit_version") - implementation("com.squareup.retrofit2:adapter-rxjava:$retrofit_version") + implementation("com.squareup.retrofit2:converter-gson:$retrofitVersion") + implementation("com.squareup.retrofit2:adapter-rxjava:$retrofitVersion") // reactivex @@ -58,11 +58,6 @@ dependencies { implementation("org.jsoup:jsoup:1.13.1") implementation("com.github.salomonbrys.kotson:kotson:2.5.0") - - val coroutinesVersion = "1.3.9" - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutinesVersion") - // dex2jar: https://github.com/DexPatcher/dex2jar/releases/tag/v2.1-20190905-lanchon implementation("com.github.DexPatcher.dex2jar:dex-tools:v2.1-20190905-lanchon") @@ -72,10 +67,10 @@ dependencies { implementation("com.fasterxml.jackson.core:jackson-databind:2.10.3") // Exposed ORM - val exposed_version = "0.28.1" - implementation("org.jetbrains.exposed:exposed-core:$exposed_version") - implementation("org.jetbrains.exposed:exposed-dao:$exposed_version") - implementation("org.jetbrains.exposed:exposed-jdbc:$exposed_version") + val exposedVersion = "0.28.1" + implementation("org.jetbrains.exposed:exposed-core:$exposedVersion") + implementation("org.jetbrains.exposed:exposed-dao:$exposedVersion") + implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion") implementation("com.h2database:h2:1.4.199") // tray icon