I want to compile a vertx project with gradle. I want to compile it into a standalone jar, and I read this can be accomplished with gradle's shadow plugin.
Now, I need to be able to do this in an offline environment. I downloaded the plugin's source code and compiled it into a jar. Now, I want to apply the plugin from that jar in my project's build.gradle. I can't figure out how to do this.
I'm aware of these answers, but both don't seem to work.
Currently, I have:
buildscript {
dependencies {
classpath fileTree(dir: "/absolute/path/to/dir", include: "shadow-1.2.3.jar")
}
}
plugins {
id 'java'
id 'application'
}
/* boring stuff */
shadowJar {
classifier = 'fat'
mergeServiceFiles {
include 'MET-INF/services/io.vertx.core.api.VerticleFactory'
}
}
When I run "gradle build", I get a "Could not find method shadowJar()" error.