-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump Kotlin to 1.9.23, enable additional Kotlin Multiplatform targets
- Loading branch information
Showing
6 changed files
with
126 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 33 additions & 5 deletions
38
buildSrc/src/main/kotlin/buildsrc/conventions/lang/kotlin-multiplatform-js.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,46 @@ | ||
package buildsrc.conventions.lang | ||
|
||
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl | ||
|
||
/** conventions for a Kotlin/JS subproject */ | ||
|
||
plugins { | ||
id("buildsrc.conventions.lang.kotlin-multiplatform-base") | ||
} | ||
|
||
kotlin { | ||
targets { | ||
js(IR) { | ||
browser() | ||
nodejs() | ||
} | ||
js(IR) { | ||
browser() | ||
nodejs() | ||
} | ||
|
||
@OptIn(ExperimentalWasmDsl::class) | ||
wasmJs { | ||
browser() | ||
nodejs() | ||
} | ||
|
||
@OptIn(ExperimentalWasmDsl::class) | ||
wasmWasi { | ||
nodejs() | ||
} | ||
} | ||
|
||
relocateKotlinJsStore() | ||
|
||
|
||
//region FIXME: WORKAROUND https://youtrack.jetbrains.com/issue/KT-65864 | ||
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> { | ||
rootProject.extensions.configure<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension> { | ||
// Use a Node.js version current enough to support Kotlin/Wasm | ||
nodeVersion = "22.0.0-nightly2024010568c8472ed9" | ||
logger.lifecycle("Using Node.js $nodeVersion to support Kotlin/Wasm") | ||
nodeDownloadBaseUrl = "https://nodejs.org/download/nightly" | ||
} | ||
} | ||
|
||
rootProject.tasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask>().configureEach { | ||
// Prevent Yarn from complaining about newer Node.js versions. | ||
args.add("--ignore-engines") | ||
} | ||
//endregion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,90 @@ | ||
rootProject.name = "urlencoder" | ||
|
||
pluginManagement { | ||
repositories { | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
repositories { | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
} | ||
|
||
@Suppress("UnstableApiUsage") | ||
dependencyResolutionManagement { | ||
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) | ||
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) | ||
|
||
repositories { | ||
mavenCentral() | ||
maven("https://oss.sonatype.org/content/repositories/snapshots") { | ||
name = "Sonatype Snapshots" | ||
mavenContent { snapshotsOnly() } | ||
} | ||
repositories { | ||
mavenCentral() | ||
maven("https://oss.sonatype.org/content/repositories/snapshots") { | ||
name = "Sonatype Snapshots" | ||
mavenContent { snapshotsOnly() } | ||
} | ||
|
||
// Declare the Node.js & Yarn download repositories | ||
exclusiveContent { | ||
forRepository { | ||
ivy("https://nodejs.org/dist/") { | ||
name = "Node Distributions at $url" | ||
patternLayout { artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]") } | ||
metadataSources { artifact() } | ||
content { includeModule("org.nodejs", "node") } | ||
// Declare the Node.js & Yarn download repositories | ||
exclusiveContent { | ||
forRepositories( | ||
ivy("https://nodejs.org/dist/") { | ||
name = "Node Distributions at $url" | ||
patternLayout { artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]") } | ||
metadataSources { artifact() } | ||
}, | ||
ivy("https://nodejs.org/download/v8-canary/") { | ||
name = "Node Canary Distributions at $url" | ||
patternLayout { artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]") } | ||
metadataSources { artifact() } | ||
}, | ||
ivy("https://nodejs.org/download/nightly/") { | ||
name = "Node Nightly Distributions at $url" | ||
patternLayout { artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]") } | ||
metadataSources { artifact() } | ||
}, | ||
) | ||
filter { includeGroup("org.nodejs") } | ||
} | ||
} | ||
filter { includeGroup("org.nodejs") } | ||
} | ||
|
||
exclusiveContent { | ||
forRepository { | ||
ivy("https://github.com/yarnpkg/yarn/releases/download") { | ||
name = "Yarn Distributions at $url" | ||
patternLayout { artifact("v[revision]/[artifact](-v[revision]).[ext]") } | ||
metadataSources { artifact() } | ||
content { includeModule("com.yarnpkg", "yarn") } | ||
exclusiveContent { | ||
forRepository { | ||
ivy("https://github.com/yarnpkg/yarn/releases/download") { | ||
name = "Yarn Distributions at $url" | ||
patternLayout { artifact("v[revision]/[artifact](-v[revision]).[ext]") } | ||
metadataSources { artifact() } | ||
} | ||
} | ||
filter { includeGroup("com.yarnpkg") } | ||
} | ||
} | ||
filter { includeGroup("com.yarnpkg") } | ||
} | ||
|
||
// workaround for https://youtrack.jetbrains.com/issue/KT-51379 | ||
exclusiveContent { | ||
forRepository { | ||
ivy("https://download.jetbrains.com/kotlin/native/builds") { | ||
name = "Kotlin Native" | ||
patternLayout { | ||
// example download URLs: | ||
// https://download.jetbrains.com/kotlin/native/builds/releases/1.7.20/linux-x86_64/kotlin-native-prebuilt-linux-x86_64-1.7.20.tar.gz | ||
// https://download.jetbrains.com/kotlin/native/builds/releases/1.7.20/windows-x86_64/kotlin-native-prebuilt-windows-x86_64-1.7.20.zip | ||
// https://download.jetbrains.com/kotlin/native/builds/releases/1.7.20/macos-x86_64/kotlin-native-prebuilt-macos-x86_64-1.7.20.tar.gz | ||
listOf( | ||
"macos-x86_64", | ||
"macos-aarch64", | ||
"osx-x86_64", | ||
"osx-aarch64", | ||
"linux-x86_64", | ||
"windows-x86_64", | ||
).forEach { os -> | ||
listOf("dev", "releases").forEach { stage -> | ||
artifact("$stage/[revision]/$os/[artifact]-[revision].[ext]") | ||
} | ||
// workaround for https://youtrack.jetbrains.com/issue/KT-51379 | ||
exclusiveContent { | ||
forRepository { | ||
ivy("https://download.jetbrains.com/kotlin/native/builds") { | ||
name = "Kotlin Native" | ||
patternLayout { | ||
// example download URLs: | ||
// https://download.jetbrains.com/kotlin/native/builds/releases/1.7.20/linux-x86_64/kotlin-native-prebuilt-linux-x86_64-1.7.20.tar.gz | ||
// https://download.jetbrains.com/kotlin/native/builds/releases/1.7.20/windows-x86_64/kotlin-native-prebuilt-windows-x86_64-1.7.20.zip | ||
// https://download.jetbrains.com/kotlin/native/builds/releases/1.7.20/macos-x86_64/kotlin-native-prebuilt-macos-x86_64-1.7.20.tar.gz | ||
listOf( | ||
"macos-x86_64", | ||
"macos-aarch64", | ||
"osx-x86_64", | ||
"osx-aarch64", | ||
"linux-x86_64", | ||
"windows-x86_64", | ||
).forEach { os -> | ||
listOf("dev", "releases").forEach { stage -> | ||
artifact("$stage/[revision]/$os/[artifact]-[revision].[ext]") | ||
} | ||
} | ||
} | ||
metadataSources { artifact() } | ||
} | ||
} | ||
} | ||
metadataSources { artifact() } | ||
filter { includeModuleByRegex(".*", ".*kotlin-native-prebuilt.*") } | ||
} | ||
} | ||
filter { includeModuleByRegex(".*", ".*kotlin-native-prebuilt.*") } | ||
} | ||
} | ||
} | ||
|
||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") | ||
|
||
include( | ||
":urlencoder-app", | ||
":urlencoder-lib", | ||
":urlencoder-app", | ||
":urlencoder-lib", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters