Building with gradle on OSX / groovy problem (maybe)

zproc

New Member
Contributor
Art
Hello,

I tried building Terasology (for the first time) with gradle AND...
I have encoutered an....
error, yes. :D

So, disclaimer: I'm not really used to OSX dev really (coming from Win & Linux), I only built a few things on OSX like the C++ Polycode Framework with CMake and Git/etc. (Also, sorry for my bad english.)

What I did:
I did not used Git for now, I just wanted to test building it guessing that would not be different just from downloading a .ZIP on GitHub. From the readme.markdown, I installed gradle.. by using homebrew (the only way I know to install cli things on OSX), "$ brew install gradle" and the version I have is "Gradle 1.0-milestone-3". But I don't know what to do for groovy... the readme doesn't mention it and the wiki from what I found only specify Idealj things... (and I want to $ gradle eclipse ), so not sure...

The error I have with $ cradle eclipse --debug (and also $ cradle idea and $ cradle dist) is :

Code:
irukandji:MovingBlocks-Terasology-4aca9a5 jm$ gradle eclipse --debug 
18:14:35.941 [INFO] [org.gradle.BuildLogger] Starting Build
18:14:35.952 [DEBUG] [org.gradle.BuildLogger] Gradle user home: /Users/jm/.gradle
18:14:35.959 [DEBUG] [org.gradle.BuildLogger] Current dir: /Users/jm/Documents/Code/MovingBlocks-Terasology-4aca9a5
18:14:35.962 [DEBUG] [org.gradle.BuildLogger] Settings file: null
18:14:35.962 [DEBUG] [org.gradle.BuildLogger] Build file: null
18:14:35.966 [DEBUG] [org.gradle.BuildLogger] Select default project: with project directory '/Users/jm/Documents/Code/MovingBlocks-Terasology-4aca9a5'
18:14:35.984 [DEBUG] [org.gradle.initialization.BuildSourceBuilder] Starting to build the build sources.
18:14:35.986 [DEBUG] [org.gradle.initialization.BuildSourceBuilder] Gradle source dir does not exist. We leave.
18:14:35.993 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found env project properties: []
18:14:35.995 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found system project properties: []
18:14:36.581 [DEBUG] [org.gradle.initialization.ScriptEvaluatingSettingsProcessor] Timing: Processing settings took: 0.585 secs
18:14:36.585 [INFO] [org.gradle.BuildLogger] Settings evaluated using empty settings file.
18:14:36.589 [DEBUG] [org.gradle.initialization.BuildLoader] Loading Project objects
18:14:36.728 [DEBUG] [org.gradle.initialization.BuildLoader] Looking for project properties from: /Users/jm/Documents/Code/MovingBlocks-Terasology-4aca9a5/gradle.properties
18:14:36.730 [DEBUG] [org.gradle.initialization.BuildLoader] project property file does not exists. We continue!
18:14:36.731 [DEBUG] [org.gradle.initialization.BuildLoader] Timing: Loading projects took: 0.139 secs
18:14:36.741 [INFO] [org.gradle.BuildLogger] Projects loaded. Root project using build file '/Users/jm/Documents/Code/MovingBlocks-Terasology-4aca9a5/build.gradle'.
18:14:36.743 [INFO] [org.gradle.BuildLogger] Included projects: [root project 'MovingBlocks-Terasology-4aca9a5']
18:14:36.747 [INFO] [org.gradle.configuration.BuildScriptProcessor] Evaluating root project 'MovingBlocks-Terasology-4aca9a5' using build file '/Users/jm/Documents/Code/MovingBlocks-Terasology-4aca9a5/build.gradle'.
18:14:38.433 [DEBUG] [org.gradle.messaging.remote.internal.TcpOutgoingConnector] Found loop-back addresses: [/0:0:0:0:0:0:0:1, /127.0.0.1].
18:14:40.902 [DEBUG] [org.gradle.configuration.BuildScriptProcessor] Timing: Running the build script took 4.154 secs
18:14:40.920 [ERROR] [org.gradle.BuildExceptionReporter] 
18:14:40.924 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
18:14:40.936 [ERROR] [org.gradle.BuildExceptionReporter] 
18:14:40.946 [ERROR] [org.gradle.BuildExceptionReporter] * Where:
18:14:40.961 [ERROR] [org.gradle.BuildExceptionReporter] Build file '/Users/jm/Documents/Code/MovingBlocks-Terasology-4aca9a5/build.gradle' line: 61
18:14:40.966 [ERROR] [org.gradle.BuildExceptionReporter] 
18:14:40.999 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
18:14:41.008 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred evaluating root project 'MovingBlocks-Terasology-4aca9a5'.
18:14:41.012 [ERROR] [org.gradle.BuildExceptionReporter] Cause: Could not find method archiveName() for arguments [Terasology.jar] on root project 'MovingBlocks-Terasology-4aca9a5'.
18:14:41.026 [ERROR] [org.gradle.BuildExceptionReporter] 
18:14:41.028 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
18:14:41.030 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'MovingBlocks-Terasology-4aca9a5'.
18:14:41.031 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.groovy.scripts.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:51)
18:14:41.032 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:127)
18:14:41.033 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)
18:14:41.034 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.configuration.DefaultProjectEvaluator.evaluate(DefaultProjectEvaluator.java:38)
18:14:41.035 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:487)
18:14:41.036 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:71)
18:14:41.053 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)
18:14:41.054 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)
18:14:41.057 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:38)
18:14:41.060 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:35)
18:14:41.062 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:463)
18:14:41.085 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:458)
18:14:41.101 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
18:14:41.102 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:141)
18:14:41.103 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:112)
18:14:41.109 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:80)
18:14:41.110 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
18:14:41.111 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
18:14:41.114 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:32)
18:14:41.115 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:21)
18:14:41.116 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:219)
18:14:41.117 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:203)
18:14:41.119 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.launcher.Main.execute(Main.java:55)
18:14:41.120 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.launcher.Main.main(Main.java:40)
18:14:41.121 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:46)
18:14:41.122 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)
18:14:41.123 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
18:14:41.124 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.internal.MissingMethodException: Could not find method archiveName() for arguments [Terasology.jar] on root project 'MovingBlocks-Terasology-4aca9a5'.
18:14:41.125 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.AbstractDynamicObject.methodMissingException(AbstractDynamicObject.java:60)
18:14:41.126 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:56)
18:14:41.127 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:106)
18:14:41.128 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.project.DefaultProject_Decorated.invokeMethod(Unknown Source)
18:14:41.129 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.groovy:68)
18:14:41.130 [ERROR] [org.gradle.BuildExceptionReporter] 	at build_1cnl8727umg19o153335g6adc1$_run_closure6.doCall(/Users/jm/Documents/Code/MovingBlocks-Terasology-4aca9a5/build.gradle:61)
18:14:41.130 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:61)
18:14:41.134 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:31)
18:14:41.144 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.DefaultNamedDomainObjectContainer$ContainerElementsDynamicObject.invokeMethod(DefaultNamedDomainObjectContainer.java:307)
18:14:41.145 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:93)
18:14:41.147 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:93)
18:14:41.148 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:93)
18:14:41.149 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.internal.project.DefaultProject_Decorated.invokeMethod(Unknown Source)
18:14:41.150 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.groovy:68)
18:14:41.151 [ERROR] [org.gradle.BuildExceptionReporter] 	at build_1cnl8727umg19o153335g6adc1.run(/Users/jm/Documents/Code/MovingBlocks-Terasology-4aca9a5/build.gradle:52)
18:14:41.153 [ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.groovy.scripts.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:49)
18:14:41.156 [ERROR] [org.gradle.BuildExceptionReporter] 	... 26 more
18:14:41.161 [ERROR] [org.gradle.BuildExceptionReporter] 
18:14:41.162 [LIFECYCLE] [org.gradle.BuildResultLogger] 
18:14:41.172 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
18:14:41.173 [LIFECYCLE] [org.gradle.BuildResultLogger] 
18:14:41.174 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 6.389 secs

So I'm not sure how to read it... In case the problem is a groovy dependence I tried to install groovy by doing $brew install groovy with no luck for the build and tried to download the source of groovy (groovy-src-1.8.2.zip) and placed the sources a bit randomly in the Terasology dir, from what I read in some build files, like src/org/codehaus/groovy with no luck as well...
same error.


hmm erm, HALP please? :)

I'm on OSX 10.7.3 with latest XCode/etc.

Thanks for having read this.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
I have a suspicion that the 1.0 milestone 3 Gradle install may be too old. We've only tested on milestone 5 and 8, and it sounds like the Gradle build is looking for an internal thing that doesn't exist :)

Two ideas!

1) Try downloading the zip from http://gradle.org/downloads and find whatever directory your 1.0 milestone 3 ended up in and replace everything in there with the contents of the zip. This should leaving you with the working setup for the automated install but with the newer version.

2) Try the experimental "gradlew" branch at https://github.com/MovingBlocks/Terasology/tree/gradlew - it comes with a Gradle wrapper that should allow you to prep for local dev without having to set up Gradle yourself (it automatically downloads the right version of Gradle)

After downloading and unzipping the branch simply run "gradlew [command]" wherever you'd normally run "gradle [command]"

I haven't personally tinkered with the Eclipse setup as opposed to our normal IntelliJ setup, so can't comment much on there, although rapodaca might as he put the initial sttuff together and uses Eclipse.

Related doc is also pending an update after the gradlew branch is merged, I'm just looking for somebody to test it :D

And welcome!
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Happy to see the branch work, validates that it is functional and better than having to install Gradle manually :D

Here's for hoping you'll find something interesting enough to join up and help out, there's plenty of stuff to go around :D
 

zproc

New Member
Contributor
Art
PS: I used Intellij Idea / its project file, couldn't get it set up for Eclipse...
 
Top