Skip to content

Commit

Permalink
upgrades and more platforms covered
Browse files Browse the repository at this point in the history
TODO android need some plugin
  • Loading branch information
jillesvangurp committed Nov 2, 2023
1 parent c0079f3 commit b26758a
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 36 deletions.
41 changes: 20 additions & 21 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,47 @@ plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
`maven-publish`
// id("com.android.library") version "3.6.1"
}

repositories {
mavenCentral()
}

kotlin {
jvm {
val main by compilations.getting {
kotlinOptions {
// Setup the Kotlin compiler options for the 'main' compilation:
jvmTarget = "1.8"
}
}
val test by compilations.getting {
kotlinOptions {
// Setup the Kotlin compiler options for the 'main' compilation:
jvmTarget = "1.8"
}
}
}
jvm { }
js(IR) {
browser()
nodejs {
testTask(Action {
useMocha {
// javascript is a lot slower than Java, we hit the default timeout of 2000
timeout = "20000"
timeout = "20s"
}
})
}
}
linuxX64()
linuxArm64()
mingwX64()
macosX64()
macosArm64()
// androidTarget {
// publishLibraryVariants("release", "debug")
// }
iosArm64()
iosX64()

sourceSets {

val commonMain by getting {
commonMain {
dependencies {
implementation(kotlin("stdlib-common"))
api("org.jetbrains.kotlinx:kotlinx-serialization-json:_")
}
}

val commonTest by getting {
commonTest {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
Expand All @@ -54,13 +53,13 @@ kotlin {
}
}

val jvmMain by getting {
jvmMain {
dependencies {
implementation(kotlin("stdlib-jdk8"))
api("org.jetbrains.kotlinx:kotlinx-serialization-json:_")
}
}
val jvmTest by getting {
jvmTest {
dependencies {
runtimeOnly("org.junit.jupiter:junit-jupiter:_")
implementation(kotlin("test-junit"))
Expand All @@ -80,14 +79,14 @@ kotlin {
}
}

val jsMain by getting {
jsMain {
dependencies {
implementation(kotlin("stdlib-js"))
api("org.jetbrains.kotlinx:kotlinx-serialization-json:_")
}
}

val jsTest by getting {
jsTest {
dependencies {
implementation(kotlin("test-js"))
}
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ version=0.0.0.1-SNAPSHOT
group=com.github.jillesvangurp
kotlin.mpp.stability.nowarn=true
org.gradle.configuration-cache=true
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m -Xmx2g -Dkotlin.daemon.jvm.options=-Xmx2g

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 7 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -202,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pluginManagement {
}

plugins {
id("de.fayard.refreshVersions") version "0.60.2"
id("de.fayard.refreshVersions") version "0.60.3"
}

refreshVersions {
Expand Down
14 changes: 8 additions & 6 deletions versions.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#### Dependencies and Plugin versions with their available updates.
#### Generated by `./gradlew refreshVersions` version 0.60.2
#### Generated by `./gradlew refreshVersions` version 0.60.3
####
#### Don't manually edit or split the comments that start with four hashtags (####),
#### they will be overwritten by refreshVersions.
Expand All @@ -9,20 +9,22 @@

version.ch.qos.logback..logback-classic=1.4.11

version.com.fasterxml.jackson.core..jackson-annotations=2.15.2
version.com.fasterxml.jackson.core..jackson-annotations=2.15.3
## # available=2.16.0-rc1

version.com.fasterxml.jackson.datatype..jackson-datatype-jsr310=2.15.2
version.com.fasterxml.jackson.datatype..jackson-datatype-jsr310=2.15.3
## # available=2.16.0-rc1

version.com.fasterxml.jackson.module..jackson-module-kotlin=2.15.2
version.com.fasterxml.jackson.module..jackson-module-kotlin=2.15.3
## # available=2.16.0-rc1

version.hamcrest=1.3

version.junit.jupiter=5.10.0

version.kotest=5.7.2

version.kotlin=1.9.10
## # available=1.9.20-Beta
version.kotlin=1.9.20

version.kotlinx.serialization=1.6.0

Expand Down

0 comments on commit b26758a

Please sign in to comment.