anti-Convention: "targetCompatibility must be set!"

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

anti-Convention: "targetCompatibility must be set!"

astubbs
I am getting this error:
The sourceCompatibility and targetCompatibility must be set!

As gradle is still a build by convention framework - can't we have a sensible default for these two settings? like 1.5?

$ gradle compile
No modern compiler.
Recursive: true
Buildfilename: build.gradle
No build sources found.
:: loading settings :: url = jar:file:/c:/java/gradle-0.2/lib/ivy-2.0.0.beta2_20080305165542.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: org.gradle#build;SNAPSHOT
        confs: [build]
++++ Starting build for primary task: compile
++ Loading Project objects
++ Configuring Project objects
Project=: evaluated.
++ Executing: compile Recursive:true Startproject: :
Executing: :init
Executing: :resources
Executing: :compile

Build aborted anormally.  Run with -s option to get stacktrace. Run with -d option to get all debug info including stacktrace. Run (additionally) with -f option to get the full (very verbose) stacktrace
Exception: org.gradle.api.GradleScriptException: org.gradle.api.InvalidUserDataException: The sourceCompatibility and targetCompatibility must be set! Buildscript=build.gradle No line info available from stacktrace.

Total time: 2 seconds
Exit with error!