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

Upgrade Kotlin version with additional targets #126

Merged
merged 8 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup and execute Gradle 'build' task
uses: gradle/gradle-build-action@v2
with:
arguments: build
arguments: build -x jsBrowserTest

- name: Upload allTests results
uses: actions/[email protected]
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Result

[![Kotlin](https://img.shields.io/badge/kotlin-1.8.10-blue.svg)](http://kotlinlang.org)
[![Kotlin](https://img.shields.io/badge/kotlin-1.9.20-blue.svg)](http://kotlinlang.org)
[![MavenCentral](https://maven-badges.herokuapp.com/maven-central/com.github.kittinunf.result/result-jvm/badge.svg)](https://search.maven.org/search?q=g:com.github.kittinunf.result)
![Run Gradle](https://github.com/kittinunf/Result/workflows/Run%20Gradle%20on%20Main/badge.svg?branch=master)
[![Codecov](https://codecov.io/github/kittinunf/Result/coverage.svg?branch=master)](https://codecov.io/gh/kittinunf/Result)
Expand Down Expand Up @@ -227,9 +227,9 @@ the [ResultTest](./result/src/commonTest/kotlin/com/github/kittinunf/result/Resu

If interested, here are more articles that one might enjoy.

* http://fsharpforfunandprofit.com/posts/recipe-part2/
* https://speakerdeck.com/swlaschin/railway-oriented-programming-a-functional-approach-to-error-handling
* https://github.com/swlaschin/Railway-Oriented-Programming-Example
* [Recipe Part 2](http://fsharpforfunandprofit.com/posts/recipe-part2/)
* [Approach Error Handing](https://speakerdeck.com/swlaschin/railway-oriented-programming-a-functional-approach-to-error-handling)
* [Example](https://github.com/swlaschin/Railway-Oriented-Programming-Example)

Credit to Scott Wlaschin

Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
kotlin = "1.9.0"
jacoco = "0.8.8"
kotlin = "1.9.20"
jacoco = "0.8.11"

[libraries]
kotlin-test-common = { module = "org.jetbrains.kotlin:kotlin-test-common", version.ref = "kotlin" }
Expand Down
47 changes: 13 additions & 34 deletions result/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ version = if (isReleaseBuild) artifactPublishVersion else "master-$gitSha-SNAPSH

kotlin {
jvm()
ios()
iosX64()
iosArm64()
js(IR) {
browser()
binaries.executable()
Expand All @@ -31,6 +32,17 @@ kotlin {
macosArm64()
macosX64()

// Apply the default hierarchy again. It'll create, for example, the iosMain source set:
applyDefaultHierarchyTemplate()

targets.configureEach {
compilations.configureEach {
compilerOptions.configure {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
}

sourceSets {
val commonMain by getting

Expand All @@ -53,39 +65,6 @@ kotlin {
implementation(libs.kotlin.test.js)
}
}

val appleMain by creating {
dependsOn(commonMain)
}
val appleTest by creating {
dependsOn(commonTest)
}

val iosMain by getting {
dependsOn(appleMain)
}
val macosArm64Main by getting {
dependsOn(appleMain)
}
val macosX64Main by getting {
dependsOn(appleMain)
}
val iosSimulatorArm64Main by getting {
dependsOn(appleMain)
}

val iosTest by getting {
dependsOn(appleTest)
}
val iosSimulatorArm64Test by getting {
dependsOn(appleTest)
}
val macosX64Test by getting {
dependsOn(appleTest)
}
val macosArm64Test by getting {
dependsOn(appleTest)
}
}
}

Expand Down