support wasmJS target
Closes
https://github.com/cashapp/multiplatform-paging/issues/232
Changes
- add wasmJs support
- I had to change jvm toolchain to 17 for local development and publish, if pipeline can pass with 11 only I can try downgrade back (ladybug comes with java 21)
Snapshot
Can check published version 3.3.0-alpha02-0.6.0-wasm.1
make sure to add maven repo
// settings.build.kts add to both pluginManagement and dependencyResolutionManagement
maven {
url = uri("https://maven.pkg.github.com/edna-aa/sqldelight")
credentials {
username = "<username>"
password = "<pat-with-read-packages>"
}
// Restrict this repository to specific versions containing "-wasm"
content {
includeGroup("app.cash.sqldelight") // Restrict to the group
includeGroup("app.cash.paging") // Restrict to the group
includeVersionByRegex("app.cash.sqldelight", ".*", ".*-wasm.*") // Match any artifact in the group with versions containing "-wasm"
includeVersionByRegex("app.cash.paging", ".*", ".*-wasm.*") // Match any artifact in the group with versions containing "-wasm"
}
}
Tested on a personal project working fine so far
Hi, the instructions listed to pull in this package don't seem to be working for me. I may be doing it wrong, does
https://maven.pkg.github.com/edna-aa/sqldelight host both the paging and sqldelight package?
And is the username and password for credentials my github username/personal-access-token?
hmm does this setup look right? I'm getting this error when trying to pull the dependency. Sorry if these are noob questions haha, haven't really pulled from other package repositories before
Error:
Cause 1: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find app.cash.paging:paging-compose-common:3.3.0-alpha02-0.6.0-wasm.1.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/app/cash/paging/paging-compose-common/3.3.0-alpha02-0.6.0-wasm.1/paging-compose-common-3.3.0-alpha02-0.6.0-wasm.1.pom
Required by:
project :composeApp
Cause 2: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find app.cash.paging:paging-common:3.3.0-alpha02-0.6.0-wasm.1.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/app/cash/paging/paging-common/3.3.0-alpha02-0.6.0-wasm.1/paging-common-3.3.0-alpha02-0.6.0-wasm.1.pom
Required by:
project :composeApp
In settings.gradle.kts
pluginManagement {
repositories {
google {
mavenContent {
includeGroupAndSubgroups("androidx")
includeGroupAndSubgroups("com.android")
includeGroupAndSubgroups("com.google")
}
}
mavenCentral()
gradlePluginPortal()
maven {
url = uri("https://maven.pkg.github.com/edna-aa/sqldelight")
credentials {
username = "wongislandd"
password = "ghp_<MY_PAT>"
}
// Restrict this repository to specific versions containing "-wasm"
content {
includeGroup("app.cash.sqldelight") // Restrict to the group
includeGroup("app.cash.paging") // Restrict to the group
includeVersionByRegex("app.cash.sqldelight", ".*", ".*-wasm.*") // Match any artifact in the group with versions containing "-wasm"
includeVersionByRegex("app.cash.paging", ".*", ".*-wasm.*") // Match any artifact in the group with versions containing "-wasm"
}
}
}
}
In libs.versions.toml
[versions]
paging3="3.3.0-alpha02-0.6.0-wasm.1"
[libraries]
paging-compose-common = { module = "app.cash.paging:paging-compose-common", version.ref = "paging3" }
paging-common = { module = "app.cash.paging:paging-common", version.ref = "paging3" }
@wongislandd
Add to both pluginManagement and dependencyResolutionManagement
pluginManagement {
repositories {
maven { }
}
}
dependencyResolutionManagement {
repositories {
maven { }
}
}
Ah yup that did the trick! Thank you 😄