Hello everyone.
I’m currently build a little script that contains common stuff for the development of my team. Since I can’t use the plugin block outside the main build script, I decided to use the old plugin syntax.
This is my common.gradle script:
buildscript {
repositories {
maven {
name "Gradle-Plugins"
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "io.franzbecker:gradle-lombok:1.8"
}
}
if (!project.hasProperty("type")) {
println "You have to specify a type!"
throw new NoSuchElementException("No type is specified!")
}
apply plugin: "java"
apply plugin: "maven"
apply plugin: "maven-publish"
apply plugin: "signing"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "io.franzbecker.gradle-lombok"
And when I include it in another build script, I get this error:
PS C:\Users\xxx\Modding\Gradle-Common\Empty Projects> gradle
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\xxx\Modding\Gradle-Common\common.gradle' line: 26
* What went wrong:
A problem occurred evaluating script.
> Plugin with id 'io.franzbecker.gradle-lombok' not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 1s
I’m using gradle 4.0 btw. How can I solve this?