Minimum JDK for Groovy

前端 未结 2 1212
遥遥无期
遥遥无期 2020-12-21 10:18

I\'m looking to write some Groovy code to perform tasks inside of install anywhere but because of the platforms we support I\'m restricted to java 1.5. Any idea if this wil

相关标签:
2条回答
  • 2020-12-21 10:52

    Java 1.5 should work. The Groovy docs state that you need at least 1.4. I use Groovy with Java 1.5, and everything works fine as far as I can tell.

    0 讨论(0)
  • 2020-12-21 11:09

    As of early 2015, the build environment for groovy 2.4.0 (in the build.gradle file) indicates:

    sourceCompatibility = 1.6
    targetCompatibility = 1.6
    

    So, for modern groovy, you want 1.6 or better. The documentation for 2.4 indicates JDK 1.5 support, which disagrees with the build environment, so be warned if you're stuck on 1.5.

    In addition, there's support for use of the invokeDynamic instruction in later releases of JDK 1.7 (it was present but known to be buggy in releases older than JDK 7u60) which may offer some performance improvements.

    0 讨论(0)
提交回复
热议问题