Skip to content

Commit

Permalink
chore: upgrade kotlin to 1.9.10 and all downstream dependencies neces…
Browse files Browse the repository at this point in the history
…sary for it to work
  • Loading branch information
Marcel Kesselring authored and Marcel Kesselring committed Oct 23, 2023
1 parent d2a4f23 commit d3a3516
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 30 deletions.
48 changes: 29 additions & 19 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import com.android.build.gradle.LibraryExtension
import com.liftric.vault.GetVaultSecretTask
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeSimulatorTest
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinCompileCommon

plugins {
id("com.android.library") version libs.versions.android.tools.gradle
kotlin("multiplatform") version libs.versions.kotlin
alias(libs.plugins.kotlin.serialization)
id("com.android.library") version libs.versions.android.tools.gradle
alias(libs.plugins.definitions)
alias(libs.plugins.npm.publishing)
alias(libs.plugins.versioning)
alias(libs.plugins.vault.client)
alias(libs.plugins.kotlin.serialization)
id("maven-publish")
id("signing")
}
Expand All @@ -33,11 +34,12 @@ kotlin {

iosSimulatorArm64()

android {
publishLibraryVariants("debug", "release")
androidTarget() {
publishAllLibraryVariants()
}
jvm()
js(IR) {
generateTypeScriptDefinitions()
browser {
testTask {
useMocha {
Expand All @@ -51,9 +53,9 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation(libs.ktor.client.core)
implementation(libs.kotlinx.coroutines)
implementation(libs.kotlinx.serialization)
api(libs.ktor.client.core)
api(libs.kotlinx.coroutines)
api(libs.kotlinx.serialization)
}
}
val commonTest by getting {
Expand All @@ -66,15 +68,15 @@ kotlin {
}
val androidMain by getting {
dependencies {
implementation(libs.ktor.client.android)
api(libs.ktor.client.android)
}
}
val jvmMain by getting {
dependencies {
implementation(libs.ktor.client.jvm)
api(libs.ktor.client.jvm)
}
}
val androidTest by getting {
val androidUnitTest by getting {
dependencies {
implementation(libs.roboelectric)
implementation(kotlin("test"))
Expand All @@ -92,7 +94,7 @@ kotlin {
}
val iosMain by getting {
dependencies {
implementation(libs.ktor.client.darwin)
api(libs.ktor.client.darwin)
}
}
val iosTest by getting
Expand All @@ -104,7 +106,7 @@ kotlin {
}
val jsMain by getting {
dependencies {
implementation(libs.ktor.client.js)
api(libs.ktor.client.js)
}
}
val jsTest by getting {
Expand All @@ -122,13 +124,12 @@ kotlin {
}
}

android {
compileSdk = 30

defaultConfig {
minSdk = 21
targetSdk = 30
testInstrumentationRunner = "androidx.test.runner"
configure<LibraryExtension> {
defaultConfig.apply {
compileSdk = 30
minSdkVersion(21)
targetSdkVersion(30)
testInstrumentationRunner = "org.robolectric.RobolectricTestRunner"
}

compileOptions {
Expand All @@ -138,9 +139,12 @@ android {

testOptions {
unitTests.apply {
isIncludeAndroidResources = true
isReturnDefaultValues = true
}
}

namespace = "com.liftric.cognito.idp"
}

group = "com.liftric"
Expand Down Expand Up @@ -352,3 +356,9 @@ vault {
vaultToken.set(System.getenv("VAULT_TOKEN"))
}
}
afterEvaluate {
tasks.getByName("compileTestKotlinJs").dependsOn("createJsEnvHack")
tasks.getByName("compileDebugUnitTestKotlinAndroid").dependsOn("createJsEnvHack")
tasks.getByName("compileTestKotlinJvm").dependsOn("createJsEnvHack")
tasks.getByName("compileReleaseUnitTestKotlinAndroid").dependsOn("createJsEnvHack")
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ android.useAndroidX=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx4096m
org.gradle.vfs.watch=true
kotlin.native.enableDependencyPropagation=false
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.mpp.enableCompatibilityMetadataVariant=true
#kotlin.native.enableDependencyPropagation=false
#kotlin.mpp.enableGranularSourceSetsMetadata=true
#kotlin.mpp.enableCompatibilityMetadataVariant=true
kotlin.incremental=true
kotlin.incremental.multiplatform=true
kotlin.caching.enabled=true
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 6 additions & 6 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ dependencyResolutionManagement {

versionCatalogs {
create("libs") {
version("android-tools-gradle", "7.2.0")
version("kotlin", "1.7.10")
version("ktor", "2.1.3")
version("android-tools-gradle", "8.1.0")
version("kotlin", "1.9.10")
version("ktor", "2.3.3")

library("ktor-client-core", "io.ktor", "ktor-client-core").versionRef("ktor")
library("ktor-client-android", "io.ktor", "ktor-client-android").versionRef("ktor")
library("ktor-client-darwin", "io.ktor", "ktor-client-darwin-legacy").versionRef("ktor")
library("ktor-client-jvm", "io.ktor", "ktor-client-java").versionRef("ktor")
library("ktor-client-js", "io.ktor", "ktor-client-js").versionRef("ktor")
library("kotlinx-coroutines", "org.jetbrains.kotlinx", "kotlinx-coroutines-core").version("1.6.1")
library("kotlinx-serialization", "org.jetbrains.kotlinx", "kotlinx-serialization-json").version("1.3.3")
library("kotlinx-coroutines", "org.jetbrains.kotlinx", "kotlinx-coroutines-core").version("1.7.3")
library("kotlinx-serialization", "org.jetbrains.kotlinx", "kotlinx-serialization-json").version("1.6.0")
library("androidx-test-core", "androidx.test", "core").version("1.2.0")
library("roboelectric", "org.robolectric", "robolectric").version("4.5.1")
library("roboelectric", "org.robolectric", "robolectric").version("4.9")
library("opt-java", "com.github.bastiaanjansen", "otp-java").version("1.3.2")

plugin("vault-client", "com.liftric.vault-client-plugin").version("2.0.0")
Expand Down
1 change: 1 addition & 0 deletions src/androidMain/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<manifest />
1 change: 0 additions & 1 deletion src/main/AndroidManifest.xml

This file was deleted.

0 comments on commit d3a3516

Please sign in to comment.