I'm struggling to configure a super simple (my 1st ever) Gradle buildscript, that will:
src/main/groovy
dir; compilation needs to include all the local (not from a repo) JARs stored in my lib/
directory/bin
(or wherever, I really don't care)myapp.jar
wrapper
task so that the gradlew
gets generated as is appropriateMy project dir structure:
myapp/
src/main/groovy/
<Groovy sources>
bin/
lib/
<lots of JARs>
build.gradle
gradle.properties
So far this is what I've tried:
apply groovy
task compile {
println "Compiling from src/main/groovy and lib/ to bin/"
javac ???
}
task jar {
println "JARring up the code"
jar ???
}
Any help or nudges in the right direction would be enormously helpful for me.
What You need to do is just to apply plugin: 'groovy'
and add the following section:
dependencies {
compile fileTree(dir: 'lib', include: '*.jar')
}