From 53f457e3a575e3d7526b6c18262d3f190d4d22e0 Mon Sep 17 00:00:00 2001 From: theberdakh Date: Mon, 22 Jul 2024 12:03:56 +0500 Subject: [PATCH] migrate :fromtouz from Android lib to pure Java/Kotlin library --- fromtouz/build.gradle.kts | 50 +++++++-------------------------------- 1 file changed, 8 insertions(+), 42 deletions(-) diff --git a/fromtouz/build.gradle.kts b/fromtouz/build.gradle.kts index 7d44951..d62b2ae 100644 --- a/fromtouz/build.gradle.kts +++ b/fromtouz/build.gradle.kts @@ -1,57 +1,23 @@ import com.android.build.gradle.internal.utils.createPublishingInfoForLibrary plugins { - id("com.android.library") - id("org.jetbrains.kotlin.android") + id("org.jetbrains.kotlin.jvm") id("maven-publish") } -android { - namespace = "com.theberdakh.fromtouz" - compileSdk = 34 - - defaultConfig { - minSdk = 24 - - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles("consumer-rules.pro") - } - - buildTypes { - release { - isMinifyEnabled = false - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - kotlinOptions { - jvmTarget = "17" - } - - publishing { - singleVariant("release") { - withSourcesJar() - withJavadocJar() - } - } - +kotlin { + jvmToolchain(17) } dependencies { - implementation("androidx.core:core-ktx:1.13.1") testImplementation("junit:junit:4.13.2") - + implementation("com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.6") implementation("com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.6") implementation("com.squareup.retrofit2:retrofit:2.11.0") - implementation("com.squareup.retrofit2:converter-gson:2.9.0") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0") + implementation("com.squareup.retrofit2:converter-gson:2.11.0") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1") // Use core coroutines + } publishing { @@ -62,7 +28,7 @@ publishing { version = "1.0.0" afterEvaluate { - from(components["release"]) + from(components["java"]) } } }