Skip to content

Commit

Permalink
Fix meta build (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
benasher44 authored Mar 19, 2024
1 parent f00110a commit f3768dd
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 90 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
project adheres to [Semantic Versioning](https://semver.org/).

## [0.8.4] - 2024-03-19
### Changed
- Fix Kotlin Metadata (#157)

## [0.8.3] - 2024-03-16
### Changed
- Bump kotlin to 1.9.23
- Add wasmWasi support
- Bump kotlin to 1.9.23 (#154)
- Add wasmWasi support (#154)

## [0.8.2] - 2023-11-10
### Changed
Expand Down
165 changes: 78 additions & 87 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,31 +46,30 @@ kotlin {
wasmJs {
d8()
}
if (HostManager.hostIsMac) {
macosX64()
macosArm64()
iosX64()
iosArm64()
iosSimulatorArm64()
watchosArm32()
watchosArm64()
watchosX64()
watchosSimulatorArm64()
watchosDeviceArm64()
tvosArm64()
tvosX64()
tvosSimulatorArm64()
macosX64()
macosArm64()
iosX64()
iosArm64()
iosSimulatorArm64()
watchosArm32()
watchosArm64()
watchosX64()
watchosSimulatorArm64()
watchosDeviceArm64()
tvosArm64()
tvosX64()
tvosSimulatorArm64()
mingwX64 {
binaries.findTest(DEBUG)!!.linkerOpts = mutableListOf("-Wl,--subsystem,windows")
}
if (HostManager.hostIsMingw || HostManager.hostIsMac) {
mingwX64 {
binaries.findTest(DEBUG)!!.linkerOpts = mutableListOf("-Wl,--subsystem,windows")
}
}
if (HostManager.hostIsLinux) {
linuxX64()
linuxArm64()
wasmWasi {
nodejs()
linuxX64()
linuxArm64()
wasmWasi {
nodejs {
testTask {
// skip on windows, since there doesn't seem to be a canary node version for use on windows
this.enabled = !HostManager.hostIsMingw
}
}
}
}
Expand Down Expand Up @@ -98,68 +97,59 @@ kotlin {
val nix64Test by creating { dependsOn(nativeTest) }
val nix32Main by creating { dependsOn(nativeMain) }
val nix32Test by creating { dependsOn(nativeTest) }

if (HostManager.hostIsMac) {
val appleMain by creating { dependsOn(nativeMain) }
val appleTest by creating { dependsOn(nativeTest) }
val apple64Main by creating {
dependsOn(appleMain)
dependsOn(nix64Main)
}
val apple64Test by creating {
dependsOn(appleTest)
dependsOn(nix64Test)
}
val apple32Main by creating {
dependsOn(appleMain)
dependsOn(nix32Main)
}
val apple32Test by creating {
dependsOn(appleTest)
dependsOn(nix32Test)
}
val iosX64Main by getting { dependsOn(apple64Main) }
val iosX64Test by getting { dependsOn(apple64Test) }
val iosArm64Main by getting { dependsOn(apple64Main) }
val iosArm64Test by getting { dependsOn(apple64Test) }
val macosX64Main by getting { dependsOn(apple64Main) }
val macosX64Test by getting { dependsOn(apple64Test) }
val macosArm64Main by getting { dependsOn(apple64Main) }
val macosArm64Test by getting { dependsOn(apple64Test) }
val iosSimulatorArm64Main by getting { dependsOn(apple64Main) }
val iosSimulatorArm64Test by getting { dependsOn(apple64Test) }
val watchosArm32Main by getting { dependsOn(apple32Main) }
val watchosArm32Test by getting { dependsOn(apple32Test) }
val watchosArm64Main by getting { dependsOn(apple64Main) }
val watchosArm64Test by getting { dependsOn(apple64Test) }
val watchosX64Main by getting { dependsOn(apple64Main) }
val watchosX64Test by getting { dependsOn(apple64Test) }
val watchosSimulatorArm64Main by getting { dependsOn(apple64Main) }
val watchosSimulatorArm64Test by getting { dependsOn(apple64Test) }
val watchosDeviceArm64Main by getting { dependsOn(apple64Main) }
val watchosDeviceArm64Test by getting { dependsOn(apple64Test) }
val tvosArm64Main by getting { dependsOn(apple64Main) }
val tvosArm64Test by getting { dependsOn(apple64Test) }
val tvosX64Main by getting { dependsOn(apple64Main) }
val tvosX64Test by getting { dependsOn(apple64Test) }
val tvosSimulatorArm64Main by getting { dependsOn(apple64Main) }
val tvosSimulatorArm64Test by getting { dependsOn(apple64Test) }
val appleMain by creating { dependsOn(nativeMain) }
val appleTest by creating { dependsOn(nativeTest) }
val apple64Main by creating {
dependsOn(appleMain)
dependsOn(nix64Main)
}

if (HostManager.hostIsMingw || HostManager.hostIsMac) {
val mingwMain by creating { dependsOn(nativeMain) }
val mingwTest by creating { dependsOn(nativeTest) }
val mingwX64Main by getting { dependsOn(mingwMain) }
val mingwX64Test by getting { dependsOn(mingwTest) }
val apple64Test by creating {
dependsOn(appleTest)
dependsOn(nix64Test)
}

if (HostManager.hostIsLinux) {
val linuxX64Main by getting { dependsOn(nix64Main) }
val linuxX64Test by getting { dependsOn(nix64Test) }
val linuxArm64Main by getting { dependsOn(nix64Main) }
val linuxArm64Test by getting { dependsOn(nix64Test) }
val wasmWasiMain by getting { dependsOn(nonJvmMain) }
val apple32Main by creating {
dependsOn(appleMain)
dependsOn(nix32Main)
}
val apple32Test by creating {
dependsOn(appleTest)
dependsOn(nix32Test)
}
val iosX64Main by getting { dependsOn(apple64Main) }
val iosX64Test by getting { dependsOn(apple64Test) }
val iosArm64Main by getting { dependsOn(apple64Main) }
val iosArm64Test by getting { dependsOn(apple64Test) }
val macosX64Main by getting { dependsOn(apple64Main) }
val macosX64Test by getting { dependsOn(apple64Test) }
val macosArm64Main by getting { dependsOn(apple64Main) }
val macosArm64Test by getting { dependsOn(apple64Test) }
val iosSimulatorArm64Main by getting { dependsOn(apple64Main) }
val iosSimulatorArm64Test by getting { dependsOn(apple64Test) }
val watchosArm32Main by getting { dependsOn(apple32Main) }
val watchosArm32Test by getting { dependsOn(apple32Test) }
val watchosArm64Main by getting { dependsOn(apple64Main) }
val watchosArm64Test by getting { dependsOn(apple64Test) }
val watchosX64Main by getting { dependsOn(apple64Main) }
val watchosX64Test by getting { dependsOn(apple64Test) }
val watchosSimulatorArm64Main by getting { dependsOn(apple64Main) }
val watchosSimulatorArm64Test by getting { dependsOn(apple64Test) }
val watchosDeviceArm64Main by getting { dependsOn(apple64Main) }
val watchosDeviceArm64Test by getting { dependsOn(apple64Test) }
val tvosArm64Main by getting { dependsOn(apple64Main) }
val tvosArm64Test by getting { dependsOn(apple64Test) }
val tvosX64Main by getting { dependsOn(apple64Main) }
val tvosX64Test by getting { dependsOn(apple64Test) }
val tvosSimulatorArm64Main by getting { dependsOn(apple64Main) }
val tvosSimulatorArm64Test by getting { dependsOn(apple64Test) }
val mingwMain by creating { dependsOn(nativeMain) }
val mingwTest by creating { dependsOn(nativeTest) }
val mingwX64Main by getting { dependsOn(mingwMain) }
val mingwX64Test by getting { dependsOn(mingwTest) }
val linuxX64Main by getting { dependsOn(nix64Main) }
val linuxX64Test by getting { dependsOn(nix64Test) }
val linuxArm64Main by getting { dependsOn(nix64Main) }
val linuxArm64Test by getting { dependsOn(nix64Test) }
val wasmWasiMain by getting { dependsOn(nonJvmMain) }
}
}

Expand All @@ -171,18 +161,19 @@ tasks.withType<KotlinNativeCompile>().configureEach {
compilerOptions.freeCompilerArgs.add("-opt-in=kotlinx.cinterop.ExperimentalForeignApi")
}

if (HostManager.hostIsLinux) {
if (!HostManager.hostIsMingw) {
// doesn't seem to be a canary version for use on windows
plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().download = true
the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion =
"21.0.0-v8-canary20231024d0ddc81258"
the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeDownloadBaseUrl =
"https://nodejs.org/download/v8-canary"
}
}

tasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask>().configureEach {
args.add("--ignore-engines")
}
tasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask>().configureEach {
args.add("--ignore-engines")
}

val ktlintConfig by configurations.creating
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kotlin.code.style=official
kotlin.incremental=true

GROUP=com.benasher44
VERSION=0.8.3
VERSION=0.8.4

POM_URL=https://github.com/benasher44/uuid/
POM_SCM_URL=https://github.com/benasher44/uuid/
Expand Down

0 comments on commit f3768dd

Please sign in to comment.