Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle Application Plugin: Forcing Script to include lib/* in Classpath

Tags:

gradle

I'm using the application plugin to create a distributable zip. Looking at the scripts that it generates the initial classpath specifies each file in the lib folder. I'd like to give my users the option of adding additional libraries to the lib folder and have the script pick those up.

Is there a way to tell the application plugin to pull in all jar files in the lib folder and not just those specified as dependencies in the Gradle build file?

like image 901
Gregg Avatar asked Apr 21 '12 18:04

Gregg


1 Answers

I figured out from the docs (after much trial and error) that I can do the following:

startScripts {
  classpath  = files('$APP_HOME/lib/*')
}
like image 159
Gregg Avatar answered Sep 28 '22 00:09

Gregg