xxfast
03/22/2023, 10:19 PMbrowser
and nodejs
. Are we able to have a seperate source set for js browser and js node, so that any consumer of my library be able chose one or the other depending on their setup?
js("browser", IR) {
browser()
}
js("node", IR) {
nodejs()
}
// browser project
js(IR){
browser()
}
jsMain by getting {
dependencies {
implementation(project(":myLibrary")) // gets sources from :myLibrary:browserMain
}
}
// node project
js(IR){
nodejs()
}
jsMain by getting {
dependencies {
implementation(project(":myLibrary")) // gets sources from :myLibrary:nodeMain
}
}
ephemient
03/22/2023, 10:37 PMAdam S
03/22/2023, 10:37 PMxxfast
03/22/2023, 11:25 PMephemient
03/22/2023, 11:51 PMxxfast
03/23/2023, 12:04 AMephemient
03/23/2023, 12:08 AMxxfast
03/23/2023, 1:12 PMnodejs
and one for browser
.
Couldn't do a runtime check because okio-nodefilesystem has a module dependency for js { nodejs() }
@ephemient can you elaborate on what you meant by dependent substitution rules?