Thomas Sundberg

July 2, 2014

Comparing Maven and Gradle

Filed under: Gradle, Maven — Tags: , , , — Thomas Sundberg @ 21:18

This post is available at http://www.thinkcode.se/blog/2014/07/02/comparing-maven-and-gradle

Advertisements

3 Comments »

  1. Hi Thomas,
    in Maven we also need to specify properties and because their default is Java 1.3 – at least in the old Maven 2.x. I do not know what the default is in Maven 3. Likely Gradle has a default as well – or maybe it is cleverer and uses the current JVM’s version. Do you happen to know these details? You know me, I am always curious. 😉

    Comment by Peter Kofler — December 1, 2014 @ 08:09

  2. Sorry, should have known that it will eat the properties inside brackes. …in Maven we also need to specify properties “maven.compiler.source” and “maven.compiler.target” …

    Comment by Peter Kofler — December 1, 2014 @ 08:10

    • Hi Peter!

      I don’t know what the default is, I haven’t looked into it enough yet.
      But I found that I could require Java 1.8 like this in another project yesterday.

      sourceCompatibility = 1.8

      I set this just after I had set
      apply plugin: ‘java’

      Searching a bit more told me that there are two properties defined by the java plugin that are what you are looking for.
      sourceCompatibility
      targetCompatibility

      More details are available at http://www.gradle.org/docs/current/userguide/java_plugin.html (Scroll down to table 23.8)

      /Thomas

      Comment by Thomas Sundberg — December 3, 2014 @ 06:24


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: