langrp / gradle-node-plugin

Gradle plugin enabling build of node based application/components along side with gradle backend build.
MIT License
3 stars 0 forks source link

System Node Installation is used for the build instead of downloaded node #1

Open schowave opened 2 years ago

schowave commented 2 years ago

Hello, we are having an issue while executing the build on our CI Server.

Currently there is a system node installed with version 12.1.1 and pnpm is not supported for this case.Is it possible to disable system node resolution? Everything is working fine except this little problem. Would it be possible to make onSystemPath Variable from com.palawan.gradle.internal.AbstractExecutable accessible?

Our Configuration:

node { download = true version = "16.15.0" command = "node" workingDir = file(".gradle/nodejs") url = "https://nodejs.org/dist"

pnpm {
    setVersion("7")
    command = "pnpm"
    workingDir = file(".gradle/pnpm")
}

}

Thank you for your help!

langrp commented 2 years ago

Hi @schowave, thanks for the feedback. I assume one could ask to download upgraded version of node packager or use different one for system wide nodejs installation. So it makes sense to me to add the download option to packager configuration. Something like

node {
    pnpm {
        download = true
        version = "7.0.0"
    }
}

Value of download from main node configuration section would then take precedence over packager config.

I also need to work more on clear documentation. Readme describes all possible parameters with their default values. Those could be changed, when needed.