Skip to content

Commit

Permalink
Merge pull request #106 from VictorKabata/maintainance
Browse files Browse the repository at this point in the history
Update dependency libs
  • Loading branch information
VictorKabata authored Jun 12, 2024
2 parents 12ded5d + 9f0352f commit 8e7e083
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 42 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ app-iOS/Pods
app-iOS/app-iOS.xcodeproj/*
app-iOS/app-iOS.xcworkspace/*
*.plist
.kotlin/
21 changes: 13 additions & 8 deletions app-android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.android.kotlin)
alias(libs.plugins.compose.compiler)
}

android {
Expand Down Expand Up @@ -30,20 +33,22 @@ android {
)
}
}

buildFeatures {
compose = true
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}

buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.7"
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}

packagingOptions {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand Down
1 change: 1 addition & 0 deletions app-desktop/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.jvm)
alias(libs.plugins.compose)
alias(libs.plugins.compose.compiler)
}

repositories {
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
alias(libs.plugins.multiplatform) apply false
alias(libs.plugins.jvm) apply false
alias(libs.plugins.nativeCocoapod) apply false
alias(libs.plugins.compose.compiler) apply false

alias(libs.plugins.ktLint)
alias(libs.plugins.detekt)
Expand Down
35 changes: 19 additions & 16 deletions daraja/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ kotlin {
iosArm64()
iosSimulatorArm64()

jvm()

// js()

cocoapods {
summary = "Daraja API Swift Wrapper built using Kotlin Multiplatform"
homepage = "https://github.com/VictorKabata/DarajaMultiplatform.git"
Expand All @@ -57,10 +61,6 @@ kotlin {
}
}

jvm()

// js()

sourceSets {
sourceSets["commonMain"].dependencies {
implementation(libs.kotlinX.coroutines)
Expand Down Expand Up @@ -104,9 +104,9 @@ kotlin {
}

android {
compileSdk = 33
defaultConfig {
minSdk = 21
compileSdk = 34
}
namespace = "com.vickikbt.darajakmp"

Expand All @@ -121,12 +121,12 @@ android {
getByName("debug") {}

getByName("release") {
isMinifyEnabled = false
isMinifyEnabled = true
}
}
}

tasks.withType<DependencyUpdatesTask> {
tasks.named<DependencyUpdatesTask>("dependencyUpdates").configure {
rejectVersionIf { isNonStable(candidate.version) && !isNonStable(currentVersion) }

checkForGradleUpdate = true
Expand All @@ -151,11 +151,18 @@ val javadocJar = tasks.register<Jar>("javadocJar") {
from(dokkaOutputDir)
}

koverReport {
verify {
rule {
isEnabled = false
bound { minValue = 20 }
kover {
reports {
verify {
rule {
minBound(30)
}
}

filters {
excludes {
classes("*BuildConfig")
}
}
}
}
Expand Down Expand Up @@ -245,7 +252,3 @@ multiplatformSwiftPackage {
kotlin.sourceSets.all {
languageSettings.optIn("kotlin.experimental.ExperimentalObjCName")
}

task("testClasses").doLast {
println("This is a dummy testClasses task")
}
6 changes: 5 additions & 1 deletion daraja/daraja.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Pod::Spec.new do |spec|
spec.summary = 'Daraja API Swift Wrapper built using Kotlin Multiplatform'
spec.vendored_frameworks = 'build/cocoapods/framework/DarajaMultiplatform.framework'
spec.libraries = 'c++'
spec.ios.deployment_target = '14.1'
spec.ios.deployment_target = '14.1'


if !Dir.exist?('build/cocoapods/framework/DarajaMultiplatform.framework') || Dir.empty?('build/cocoapods/framework/DarajaMultiplatform.framework')
Expand All @@ -22,6 +22,10 @@ Pod::Spec.new do |spec|
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
end

spec.xcconfig = {
'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO',
}

spec.pod_target_xcconfig = {
'KOTLIN_PROJECT_PATH' => ':daraja',
'PRODUCT_MODULE_NAME' => 'DarajaMultiplatform',
Expand Down
34 changes: 17 additions & 17 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
[versions]
kotlin = "1.9.21"
gradle = "7.4.1"
kotlin = "2.0.0"
agp = "7.4.2"
ktLint = "11.6.0"
detekt = "1.19.0"
spotless = "6.2.2"
nativeCocoapod = "1.9.0"
dokka = "1.9.10"
kover = "0.7.5"
dokka = "1.9.20"
kover = "0.8.1"
mulitplatformSwiftPackage = "2.0.3"
gradleVersionUpdate = "0.50.0"
gradleVersionUpdate = "0.51.0"

# Kotlin Multiplatform Version
kotlinxCoroutines = "1.7.3"
kotlinxSerializationJson = "1.6.2"
kotlinxDateTime = "0.5.0"
napier = "2.6.1"
ktor = "2.3.7"
kotlinxCoroutines = "1.9.0-RC"
kotlinxSerializationJson = "1.7.0"
kotlinxDateTime = "0.6.0"
napier = "2.7.1"
ktor = "2.3.11"
kotlinxTestResources = "0.2.2"
composeMultiplatform = "1.5.11"
cache4k = "0.11.0" # 0.12.0 breaks build
mockative = "2.0.1"
composeMultiplatform = "1.6.11"
cache4k = "0.13.0"
mockative = "2.2.2"

[plugins]
ktLint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktLint" }
Expand All @@ -28,8 +27,8 @@ spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
nativeCocoapod = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
android-kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
android-library = { id = "com.android.library", version.ref = "gradle" }
android-application = { id = "com.android.application", version.ref = "gradle" }
android-library = { id = "com.android.library", version.ref = "agp" }
android-application = { id = "com.android.application", version.ref = "agp" }
jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlinX-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
Expand All @@ -38,6 +37,7 @@ multiplatformSwiftPackage = { id = "com.chromaticnoise.multiplatform-swiftpackag
gradleVersionUpdate = { id = "com.github.ben-manes.versions", version.ref = "gradleVersionUpdate" }

compose = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

[libraries]
#Kotlin Multiplatform Lib Dependencies
Expand All @@ -59,4 +59,4 @@ cache4k = { module = "io.github.reactivecircus.cache4k:cache4k", version.ref = "
#Tests Lib Dependencies
# kotlinX-testResources = { module = "com.goncalossilva:resources", version.ref = "kotlinxTestResources" }
kotlinX-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" }
mockative={module="io.mockative:mockative", version.ref="mockative"}
mockative = { module = "io.mockative:mockative", version.ref = "mockative" }

0 comments on commit 8e7e083

Please sign in to comment.