我有一个多项目,它的一些子项目使用Node的分级插件。
./子项目/build.gradle
// GitHub: https://github.com/node-gradle/gradle-node-plugin
plugins {
id "com.github.node-gradle.node" version "3.4.0"
}
// ...现在我想从根build.gradle配置所有这些子项目。
./build.gradle
pluginManager.withPlugin('what.do.i.put.here') {
node {
download = true
}
// ...
}现在,我的问题:作为withPlugin的参数,我必须输入什么?我在哪里找到使用“官方”插件的名称?
发布于 2022-08-11 12:07:42
我没有使用pluginManager,而是找到了以下方法来实现这一点:
// This is executed on all subprojects
subprojects {
// This is executed on all subprojects that use the NodeJS plugin (https://github.com/node-gradle/gradle-node-plugin - npm_<...> (e.g., npm_install))
plugins.withId('com.github.node-gradle.node') {
node {
download = true
}它在subprojects内部使用subprojects,使用plugins部分中也指定的ID :com.github.node-gradle.ode
https://stackoverflow.com/questions/73320186
复制相似问题