I’d like to apply gradle-js-plugin from a script other than build.gradle.
build.gradle
apply from: 'js.gradle'
js.gradle
buildscript {
repositories { mavenCentral() }
dependencies {
classpath 'com.eriwen:gradle-js-plugin:1.5.0'
}
}
apply plugin: 'js'
javascript.source {
dev {
js {
srcDir src
}
}
}
This fails with “Plugin with id ‘js’ not found.” error. If I move buildscript block and ‘apply plugin: ‘js’’ to build.gradle, things go well. However, my actual build.gradle is several hundred length, so I’m inclined to separate file in above way.
How can I get around with this?