Changing Gradle Compile .jar Path from Libs folder

Viewed 599

I'd simply like to know, as the title states, how one would go about changing the Gradle Compiler output directory from the Libs directory, to a specific directory.

So, on build of my project, a compiled .jar file would be generated within a designated directory, by itself. This shouldn't be too hard to accomplish, though I've found no information on the topic, and me being a new Gradle user, I cannot seem to figure this one out.

I am aware that this is not a normally recommended thing to do, and many will not understand as to why I'd wish to do such things. Shortly, I am a Java Minecraft Server Plugin developer, and my development can only be tested when running a personal Testing Minecraft server locally. I want the compiler to output the jar file directly into the plugins directory of the Minecraft server.

1 Answers
subprojects {
    apply plugin: 'java'
    tasks.withType(Jar) {
        destinationDir = file("$rootDir/build/New_libs")
    }
}
Related