Unable to build

Issue #31 resolved
Patrick Kutch created an issue

Did a clean pull, even updated JRE and JDK to latest. I get the following error: C:\Users\Patrick\enzo>gradlew build

FAILURE: Build failed with an exception.

  • Where: Build file 'C:\Users\Patrick\enzo\build.gradle' line: 55

  • What went wrong: A problem occurred evaluating root project 'Enzo'.

    Could not find method jdkName() for arguments [1.8] on org.gradle.plugins.ide. idea.model.IdeaProject_Decorated@237f7970.

Comments (21)

  1. Gerrit Grunwald repo owner

    Builds totally fine for me. So what gradle version do you use? On my machine I use the following setup:


    Gradle 2.3

    Build time: 2015-02-16 05:09:33 UTC Build number: none Revision: 586be72bf6e3df1ee7676d1f2a3afd9157341274

    Groovy: 2.3.9 Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013 JVM: 1.8.0_45 (Oracle Corporation 25.45-b02) OS: Mac OS X 10.10.4 x86_64

  2. Patrick Kutch reporter

    Well... I have something a bit older Groovy: 1.8.6 Ant: Apache Ant(TM) version 1.9.2 compiled on July 8 2013 Ivy: 2.2.0 JVM: 1.8.0_05 (Oracle Corporation 25.5-b02)

    I'll update and try again :-)

  3. Patrick Kutch reporter

    Yup. I had an old version (installed with Git, 18 months ago). Installed latest Git and build is much happier! Apologies. Closing.

  4. Patrick Kutch reporter
    • changed status to open

    Re-opening. Still blows up on me. Completely fresh pull (new directory). Attaching an output file. Have same versions of everything you have, except I am running on Windows 7....

  5. Patrick Kutch reporter

    Attaching build output. Same error, could not find jdkName()

    I'm ignorant about Gradle, so I am challenged to help figure this out.


    Gradle 2.3

    Build time: 2015-02-16 05:09:33 UTC Build number: none Revision: 586be72bf6e3df1ee7676d1f2a3afd9157341274

    Groovy: 2.3.9 Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013 JVM: 1.8.0_45 (Oracle Corporation 25.45-b02) OS: Windows 7 6.1 amd64

  6. Patrick Kutch reporter

    I created a brand new Windows 7 x64 system (a VM actually). I installed latest JDK and Git for windows (1.9.5) which comes with gradle 2.3.

    Pulled repository and did a build, result was the same - failed with jdkName(). Cannot built on my windows box.

    Hoping you have some ideas.

  7. Gerrit Grunwald repo owner

    Maybe adding a JDK_PATH environment variable pointing to the JDK 1.8_45 folder might fix it...not sure...

  8. Patrick Kutch reporter

    Good suggestion, however no change.

    Last pull I did (before few days ago) was from March, probably 'cosmetics related to jdk8u40' and it worked fine. Don't know if that helps or not to narrow issue.

  9. Patrick Kutch reporter

    Was able to get things to compile by going back to the previous version of build.gradle. For some reason the changes made in the newer one are not happy with the vanilla system I have described earlier.

  10. Gerrit Grunwald repo owner

    hmm...strange...was jdkName() the only difference between both files? Can't reproduce the problem on my mac...

  11. Patrick Kutch reporter

    No there was quite a number of differences, since I'm not versed on gradle I gave up trying to figure out what was the culprit. Be happy to try something if you have a suggestion.

  12. John Sirach

    I'm having the same issue (using gradle 2.3). I have not yet tried to build the updated version, but if it still exist: I have removed the following lines referring to idea from the parent build file (I'm a NetBeans user btw):

    apply plugin: 'idea'
    

    and

    idea {
        project {
            jdkName sourceCompatibility
            languageLevel sourceCompatibility
        }
    }
    

    It now builds at my side.

    [EDIT]

    Setting the versions explicitly also seems to help:

    jdkName '1.8'
    languageLevel '1.8'
    
  13. Patrick Kutch reporter
    • changed status to open

    With update the build completes, however it does not create a valid jar file as you can see below, it is only 261 bytes long.

    :ValidationPane:test UP-TO-DATE :ValidationPane:check UP-TO-DATE :ValidationPane:build

    BUILD SUCCESSFUL

    Total time: 59.69 secs C:\Users\Patrick\enzo>dir build\libs Volume in drive C has no label. Volume Serial Number is 1ECA-6660

    Directory of C:\Users\Patrick\enzo\build\libs

    09/07/2015 09:04 AM <DIR> . 09/07/2015 09:04 AM <DIR> .. 09/07/2015 09:04 AM 1,245,452 Enzo-javadoc.jar 09/07/2015 09:04 AM 1,583,491 Enzo-sources.jar 09/07/2015 09:04 AM 261 Enzo.jar 3 File(s) 2,829,204 bytes 2 Dir(s) 36,430,057,472 bytes free

    C:\Users\Patrick\enzo>

  14. Gerrit Grunwald repo owner

    hmm...cloned a new copy from bitbucket and build it on the command line and it just works. The jar is 2.3 MB. Really strange...will try to figure that out...

  15. Gerrit Grunwald repo owner

    Ok, finally found the problem and fixed it, now it should really build the jar like expected :)

  16. Log in to comment