1

ok, 3 bugs below I 'think' but if they are not let me know. (I do LOVE the customizability of gradle and these are corner case bugs for sure but still inconsistent behaviors)

  • gradle version 2.14.1
  • Eclipse Neon 4.6.0 build id 20160613-1800
  • Buildship, Eclipse Plugins for gradle 1.0.20v20160901-0734

I LOVE making things seamless so I really wanted to make things seamless on using eclipse with this project https://github.com/deanhiller/webpiecesExample as a test run.

BUG 1: Instead, I found a bug in the eclipse buildship gradle plugin that does not bring in -parameters to the project settings like ./gradlew eclipse does :(.

I have the following that makes my gradle compile with parameters (and ./gradlew eclipse generates the correct settings file while buildship ecilpse gradle plugin does not)

[compileJava, compileTestJava]*.options.collect {options ->
    options.compilerArgs.add '-parameters'
}

BUG 2: so then I switch to ./gradlew eclipse. That then has a different bug in that it generates two src/main/java when using a section like this.....

sourceSets {
//For testing, we need to put the html files on the classpath which are co-located with the controllers
extraTest {
    resources {
        srcDirs = ["src/main/java"]
        includes = ["**/*.html", "**/*.tag"]
    }
}
test {
    resources {
        //This ADDS src/test/java/**/*.html and we still read in src/test/resources/**
        source extraTest.resources
    }
}
} 

BUG 3: In trying to figure this all out, I finally found out gradlew cleanEclipse does not clean stuff that was generated by gradlew eclipse specifically the .settings folder :(. I basically can do a ./gradlew eclipse and then gradlew cleanEclipse and they don't delete what was created :(.

FEATURE REQUEST 1: The application plugin I had to hack like this....(definitely read my comments as the solution ended up not working and I had to hack it differently).

How to configure gradle application plugin to set my user.dir to the location of the script?

You should totally be able to tell the application plugin that one desires the application directory to be where the program starts no matter what directory I start the application from....that was very frustrating to fix all that.

I still love gradle. I am just getting very down and dirty in the details here and hope that eventually these nitpicks can be fixed.

Community
  • 1
  • 1
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
  • That's the Eclipse for you... Open source and developed for years and still has annoying unfixed bugs here and there... The reason I switched to Intellij, excels in stability and its gradle plugin works fine. – Alexiy Sep 04 '16 at 10:35
  • @Alexiy heh, try intellij...it was an even worse experience :(. I am trying to get that working and report all those issues today as well. – Dean Hiller Sep 04 '16 at 14:19
  • @Alexiy intellij completely failed so far, but I posted this post.... http://stackoverflow.com/questions/39322753/how-to-add-resource-files-in-intellij-from-src-main-java-directoryintellij-2016 perhaps someone will know how to fix it so I can work in intellij for a while. – Dean Hiller Sep 05 '16 at 01:44
  • Ok, how about using native gradle distribution? And of the latest version. – Alexiy Sep 05 '16 at 13:49

0 Answers0