Subprojects: They each create a build folder typic...
# gradle
g
Subprojects: They each create a build folder typically and then the parent has a build folder too but mine is essentially empty; I assume there is someway to like, start pulling from subprojects to populate the parent build folder? Does any of this make sense or am I crazy? Trying to find documentation on this or clarity what's really expected.
o
it's expected that subproject's results are in its build folder, and not in the parent. if you want to pull them up for whatever reason, you need to define your own Copy or Sync task to do that
g
okay, thanks
o
or I guess for each thing you want to appear there, you could reconfigure the task that produces it to put it in the parent build folder
I would not set each subproject's build folder to the parent's build folder, as plugins don't expect that and might cause issues
g
ok... I'm trying to do two separate gradle projects with plugins kotlin("jvm") and the other with kotlin("js"), then merge so in distro jvm is serving up the results. Not sure if its possible yet. I'm basically trying to do kotlin multiplatform without that horrible plugin
o
I don't know what task makes the final js artifact, but you should be able to pull that task's outputs into wherever you want, e.g.
Copy code
tasks.register<Copy>("copyJs") {
  from(project(":yourJsProject").tasks.named("jsArtifactTask"))
  into("yourAssetDir")
}
g
ah, makes sense... not sure what format comes out, looks like a jar of JSes, lol
o
if it's a jar that you need to unpack, you can wrap the argument to
from
with
zipTree(...)
g
okay cool. hope this works... would be so simple and elegant if it did