About Monkey 2 › Forums › Monkey 2 Development › V009 now up!
This topic contains 33 replies, has 8 voices, and was last updated by 
 peterigz
 2 years, 10 months ago.
- 
		AuthorPosts
 - 
		
			
				
June 10, 2016 at 7:10 am #1023
Good to hear. Let me know of any problems you find, ok?
June 10, 2016 at 7:47 pm #1028Seems to work quite well so far, thanks
there was an initial issue with REM and END (in caps) not recognised but a search and replace sorted that (you might want to add it though non-the-less). I shall have to take a look at gradle and see if I can set that up as well.
June 10, 2016 at 8:36 pm #1029Thanks. I’ve fixed that. It’s weird, some things in Monkey2 are case sensitive and some are not. Module classes all are case-sensitive, so I think I have them all fixed. Same goes for module constant, also case-sensitive. Lots of keywords are not. So I’m just fixing these little things as I create and read more and more code.
Nice! Gradle is not that bad to set up. You also need the sublime text project files set up in a certain way.
For instance, this is the ST3 project I use for playing around. It has two build systems, one debug and one release. The name parameter is what shows up in ST3, the cmd parameter is the shell command that is executed.
Monkey12345678910111213141516171819202122232425{"folders": [{"path": ".","file_exclude_patterns": [ ".git*", "*.i", "*.sublime-workspace"],"folder_exclude_patterns": [".gradle"]}],"build_systems": [{"name": "Gradle: Build and run BD debug","cmd": "gradle --daemon build_project_debug","working_dir": "${project_path}","shell": "true"},{"name": "Gradle: Build and run BD release","cmd": "gradle --daemon build_project_release","working_dir": "${project_path}","shell": "true"}]}You will also need a file called build.gradle, it must be in the same folder. It defines the tasks referenced in the build systems. PROJECT_NAME must be the same as your main file.
Monkey123456789101112131415161718192021222324252627282930313233343536def PROJECT_NAME = "bd.monkey2"task build_project_debug << {println "Building project DEBUG...\n"def command = "/home/wiebo/Monkey2/bin/mx2cc_linux makeapp -run -clean -target=desktop -config=debug $PROJECT_NAME"print "Running command: '$command'\n"def proc = command.execute()proc.in.eachLine {line -> println line}proc.err.eachLine {line -> println 'ERROR: ' + line}proc.waitFor()def exitValue = proc.exitValue()if (exitValue != 0) {throw new GradleException ("Build project failed with exit code: $exitValue")}}task build_project_release << {println "Building project RELEASE...\n"def command = "/home/wiebo/Monkey2/bin/mx2cc_linux makeapp -run -clean -target=desktop -config=release $PROJECT_NAME"print "Running command: '$command'\n"def proc = command.execute()proc.in.eachLine {line -> println line}proc.err.eachLine {line -> println 'ERROR: ' + line}proc.waitFor()def exitValue = proc.exitValue()if (exitValue != 0) {throw new GradleException ("Build project failed with exit code: $exitValue")}}June 10, 2016 at 10:19 pm #1030Thanks I’ll give that try!
 - 
		AuthorPosts
 
You must be logged in to reply to this topic.