gradle build: fixing groovy.lang.GroovyRuntimeException: Cannot get the value of write-only property 'classes' on source set main
As per documentation, this should work in a gradle build:
task packageJar(type: Jar) {
from sourceSets.main.classes
}
But if you run it, you get probably an error in Gradle 1.2.
Instead, try this:
task packageJar(type: Jar) {
from sourceSets.main.output
}
And everything should work just fine.
Written by Koen De Waele
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#