Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle + Kotlin + Dependency updates #311

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,20 @@ android {
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}

lint {
warningsAsErrors = false
abortOnError = true
Expand Down
18 changes: 6 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@

// https://youtrack.jetbrains.com/issue/KTIJ-19369
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.gradleVersions)
alias(libs.plugins.ktlint) apply false

kotlin("multiplatform") version libs.versions.kotlin.get() apply false
kotlin("plugin.serialization") version libs.versions.kotlin.get() apply false
id("app.cash.sqldelight") version libs.versions.sqlDelight.get() apply false
id("com.android.library") version libs.versions.android.gradle.plugin.get() apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.sqlDelight) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.skie) apply false
}

allprojects {
Expand All @@ -19,9 +15,7 @@ allprojects {
}

subprojects {
// TODO libs doesn't resolve if we do this
// apply(plugin = libs.plugins.ktlint.get().pluginId)
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = rootProject.libs.plugins.ktlint.get().pluginId)

configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
enableExperimentalRules.set(true)
Expand Down
2 changes: 2 additions & 0 deletions docs/DEBUGGING_KOTLIN_IN_XCODE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Debugging Kotlin in Xcode

> Note that if there is a [known issue](https://github.com/touchlab/xcode-kotlin/issues/95) with `xcode-kotlin` plugin on Xcode 15

By this point you should be able to build and run KaMP Kit in iOS using Xcode. Great! Maybe you've
changed a variable and want to see if it actually updated successfully, but how do you do that? Well
we at Touchlab have actually created a way to **debug kotlin code in Xcode**.
Expand Down
2 changes: 0 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ android.useAndroidX=true
kotlin.code.style=official
# Tell the KMM plugin where the iOS project lives
xcodeproj=./ios
# New Android source-set layout
kotlin.mpp.androidSourceSetLayoutVersion=2
29 changes: 16 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
[versions]
kotlin = "1.9.0"

## SDK Versions
minSdk = "21"
targetSdk = "34"
compileSdk = "34"

# Dependencies
android-gradle-plugin = "8.0.2"
kotlin = "1.9.10"

android-gradle-plugin = "8.1.1"
ktlint-gradle = "11.4.2"
gradle-versions = "0.47.0"

compose = "1.5.0"
composeCompiler = "1.5.2"
compose = "1.5.2"
composeCompiler = "1.5.3"

android-desugaring = "2.0.3"
androidx-core = "1.10.1"
androidx-core = "1.12.0"
androidx-test-junit = "1.1.5"
androidx-activity-compose = "1.7.2"
androidx-lifecycle = "2.6.1"
androidx-lifecycle = "2.6.2"

junit = "4.13.2"

coroutines = "1.7.3"
kotlinx-datetime = "0.4.0"
ktor = "2.3.3"
kotlinx-datetime = "0.4.1"
ktor = "2.3.4"

robolectric = "4.10.3"

kermit = "2.0.0-RC3"
kermit = "2.0.1"
skie = "0.5.0"

koin = "3.4.3"
koin = "3.5.0"
multiplatformSettings = "1.0.0"
turbine = "1.0.0"
sqlDelight = "2.0.0"
Expand Down Expand Up @@ -90,7 +89,11 @@ kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotl

[plugins]
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint-gradle" }
gradleVersions = { id = "com.github.ben-manes.versions", version.ref = "gradle-versions" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
sqlDelight = { id = "app.cash.sqldelight", version.ref = "sqlDelight" }
android-library = { id = "com.android.library", version.ref = "android-gradle-plugin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
skie = { id = "co.touchlab.skie", version.ref = "skie" }

[bundles]
app-ui = [
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Aug 29 21:56:54 EDT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading