Closed polaroidkidd closed 1 year ago
Could you try building it with --scan
and link to the build scan here? The link to the repository provided 404s, it might be a private repository
The order of inputs and outputs doesn't matter and will only affect when Gradle re-runs the task (and how it's cached if caching is enabled on the task)
So in short, if you want to change where the output is you need to configure yarn to do that, this plugin runs yarn run cms:build
from the project directory (or workingDir
) if set.
(You do still want inputs and outputs to be correct so that Gradle doesn't re-run the task unless the input or output has changed :-) )
oh, my bad. I've made it public now. Here are the results of the scan: https://scans.gradle.com/s/3xov5g6jvrmg4
Looking at the buildscan it seems to be running fine, there's the:
$ strapi build
Building your admin UI with development configuration ...
ℹ Compiling Webpack |
Done in 9.40s.
I can't find any webpack configuration so it might default to creating a main.js
which I'd expect to see in the cms
directory, or possibly in a dist
folder in there
Running it with the yarn command yarn run cms:build
creates a build folder with the build output. I think the webpack configuration comes from on of folders inside node_modules from strapi.
Ah, but the gradle task yarnBuild
does not create that build folder?
it creates the build folder, but after the task is complete, it remains empty.
Having taken another look at this there's 2 things that stand out:
buildYarn
should depend on yarn
(which is the task that does the installations)Apart from that, everything looks like expected, it might be that yarn install might need to be run, but as far as I can tell things are setup like expected and the gradle plugin is doing what it should (i.e. starting yarn with the correct parameters)
Hi
I fixed the broken gradle wrapper and added the yarn install task dependency (http://github.com/polaroidkidd/wichtel/blob/ac5df7e2ceb7f22a7b06599067478af3860293e3/cms/build.gradle.kts#L31-L31).
When I run the ./gradlew buildYarn
task I still get an empty build
folder, however, I've noticed that the .cache
folder contains (what I assume) an uncompiled strapi admin panel version. The generated package.json
in the .cache
folder appears to match the package.json
from their repository: https://github.com/strapi/strapi/blob/master/packages/strapi-admin/package.json
Could it be that strapi is expecting the webpack build files to be somewhere else and errors out of the build silently when it can't find them?
I'm trying to build strapi using this plugin, but for some reason I always get an empty output folder, even though the logs show that it's being build (and the time spent building is the same it takes to build it using yarn).
You can reproduce it using my project (branch
feat/scaffolding
, the specific build task is located here and looks like thisI've tried rearranging the
inputs.dir
andoutput.dir
but it all resulted in the same problem. I'm fairly sure this isn't actually an issue with your plugin but a misconfiguration of the task on my part. Regardless, I'd be grateful for any pointers on how to fix this.