Skip to content

Commit

Permalink
Update Kotlin and some dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed Dec 17, 2023
1 parent a1e5a85 commit 89ebe75
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 73 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ captures/
*.hprof


!/renovate.json
26 changes: 13 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
[versions]
android-gradle-plugin = "8.1.1"
android-gradle-plugin = "8.1.2"
android-compile-sdk = "34"
android-min-sdk = "21"
android-target-sdk = "34"
kotlin = "1.9.10"
kotlin = "1.9.21"
library-version-name = "6.0.4"

# Library dependencies
com-squareup-okhttp3 = "4.10.0"
com-squareup-okhttp3 = "4.12.0"
com-vanniktech-maven-publish="0.22.0"
org-robolectric = "4.9"
org-robolectric = "4.11.1"
binary-compatibility-validator = "0.13.2"
coroutines = "1.7.3"
com-github-ben-manes-versions = "0.43.0"

# Sample dependencies
androidx-activity = "1.7.1"
androidx-activity = "1.8.1"
androidx-appcompat = "1.6.1"
androidx-cardview = "1.0.0"
androidx-constraintlayout = "2.1.4"
androidx-lifecycle-runtime = "2.6.1"
androidx-lifecycle-viewmodel-ktx = "2.6.1"
androidx-recyclerview = "1.3.0"
androidx-lifecycle-runtime = "2.6.2"
androidx-lifecycle-viewmodel-ktx = "2.6.2"
androidx-recyclerview = "1.3.2"
androidx-swiperefreshlayout = "1.1.0"
com-google-android-material = "1.9.0"
compose-multiplatform = "1.5.1"
io-coil = "2.2.2"
com-google-android-material = "1.10.0"
compose-multiplatform = "1.5.11"
io-coil = "2.5.0"
androidx-lifecycle-extensions = "2.2.0"
compose-compiler = "1.5.3"
compose-compiler = "1.5.6"
androidx-compose-bom = "2023.10.01"
activity-compose = "1.7.2"
activity-compose = "1.8.1"

[libraries]
# Library dependencies
Expand Down
16 changes: 16 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"packageRules": [
{
"groupName": "Kotlin, KSP, Compose Compiler and KMP-NativeCoroutines",
"groupSlug": "kotlin",
"matchPackageNames": [
"org.jetbrains.kotlin",
"org.jetbrains.compose"
]
}
]
}
67 changes: 30 additions & 37 deletions rssparser/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
Expand All @@ -22,57 +24,66 @@ kotlin {
}
}

ios()
iosArm64()
iosX64()
iosSimulatorArm64()

applyDefaultHierarchyTemplate()

tasks.withType(KotlinCompile::class).configureEach {
compilerOptions {
freeCompilerArgs.addAll("-Xexpect-actual-classes")
}

kotlinOptions.freeCompilerArgs += "-Xexpect-actual-classes"
}

sourceSets {
all {
languageSettings.apply {
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
}
}

val commonMain by getting {
dependencies {
implementation(libs.kotlinx.coroutines.core)
}
commonMain.dependencies {
implementation(libs.kotlinx.coroutines.core)
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
implementation(libs.kotlinx.coroutines.test)
}

commonTest.dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
implementation(libs.kotlinx.coroutines.test)
}


val commonJvmAndroidMain by creating {
dependsOn(commonMain)
dependsOn(commonMain.get())

dependencies {
api(libs.com.squareup.okhttp3)
}
}

val commonJvmAndroidTest by creating {
dependsOn(commonTest)
dependsOn(commonTest.get())
}

val jvmMain by getting {
dependsOn(commonJvmAndroidMain)
}
val jvmTest by getting {
jvmMain.get().dependsOn(commonJvmAndroidMain)
jvmTest {
dependsOn(commonJvmAndroidTest)
dependencies {
implementation(kotlin("test-junit"))
}
}
val androidMain by getting {

androidMain {
dependsOn(commonJvmAndroidMain)
dependencies {
implementation(libs.kotlinx.coroutines.android)
}
}

val androidUnitTest by getting {
dependsOn(commonJvmAndroidTest)

Expand All @@ -81,24 +92,6 @@ kotlin {
implementation(kotlin("test-junit"))
}
}
val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by getting {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
}
val iosX64Test by getting
val iosArm64Test by getting
val iosSimulatorArm64Test by getting
val iosTest by getting {
dependsOn(commonTest)
iosX64Test.dependsOn(this)
iosArm64Test.dependsOn(this)
iosSimulatorArm64Test.dependsOn(this)
}
}
}

Expand Down
Binary file not shown.
26 changes: 3 additions & 23 deletions sample/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,9 @@ kotlin {
}

sourceSets {
val commonMain by getting {
dependencies {
implementation(project(":rssparser"))
implementation(libs.kotlinx.coroutines.core)
}
}

val androidMain by getting {
dependsOn(commonMain)
}

val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by creating {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
}

val desktopMain by getting {
dependsOn(commonMain)
commonMain.dependencies {
implementation(project(":rssparser"))
implementation(libs.kotlinx.coroutines.core)
}
}
}
Expand Down

0 comments on commit 89ebe75

Please sign in to comment.