• Home
  • Events
  • About
  • Using lambdas with JavaFX 8 and gradle

    UPDATE: the workaround described in the following sections does only apply to gradle 1.9 and below. From version 1.10 of gradle everything works as expected again.

    Lambda expressions coming with Java 8 are really great. Having played around with them I decided to migrate my current JavaFX projects and apply lambda expressions where it makes sense. In my IDE (IntelliJ IDEA) all worked fine but when I ran my gradle (1.7) build a weird message appeared:

    It turns out that the way gradle is scanning for class files to find out which ones are test classes causes the problem. Most likely due to different bytecodes produced by the Java 8 compiler.
    Fortunately the scanning process can be turned off as described in gradle’s documentation. Then you just have to configure your test classes manually as in the following example and everything works again.

    – Sven Ehrke, @syendar

    Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
    • DZone
    • Y!GG
    • Webnews
    • Digg
    • del.icio.us
    • DotNetKicks
    • Facebook
    • Google Bookmarks
    • Newsrider
    • Twitter
    • YahooBuzz

    1 Comment »

    1. GernotStarke said,

      March 30, 2014 @ 21:32

      thanx for that helpful snippet.

      Even in grails 1.11 with IntelliJ 13.1.1 it’s required… as .class files won’t be found during “standard” setup…
      (although everything works on the command line).

    RSS feed for comments on this post

    Leave a Comment


    × 5 = twenty

    css.php