robovm / robovm-gradle-plugin

RoboVM Gradle plugin
45 stars 24 forks source link

Can't build libgdx project #4

Closed mattwalters closed 10 years ago

mattwalters commented 10 years ago

Hello, I have posted a question on SO that I thought might be pertinent to this project: http://stackoverflow.com/questions/21267369/cant-launch-libgdx-ios-robovm-build-in-iphone-simulator-with-gradle

mariusk commented 10 years ago

Yeah, seems like we jumped the gun a bit early. There are some typos in the default libgdx setup stuff ("Launncher"), and the src tree for the ios setup is not correct (it needs to be set to 'src', see the gwt or android project for how it's done in their respective build.gradle tasks). That should get the build going. Unfortunately, you will not be able to run it yet as libgdx has dependencies on some native libraries (*.a libs) which I believe this plugin does not support yet. I'm creating a new issue for that now.

mattwalters commented 10 years ago

I think I've fixed the first two bugs you mentioned (setting 'src' and "Launncher"). Working on linking the .a libs now. Hoping to submit a pull request for this soon =]

sixman9 commented 10 years ago

Hi Guys, Danno Ferrin (shemnon) may have coded a potential solution regarding the resolution of the native runtimes/runtime classpath when building against the RoboVM APIs from within Gradle.

Examining https://github.com/shemnon/robovm-sample-ios-app/blob/master/robovm.gradle

[By recently modifying shemnon's script sufficiently,] I got the libGDX Gradle template project to run on the IOS simulator (Xcode 5.0.2 on Mountain Lion 10.8.5) :+1: .

[I'm not writing this from my Mac right now, (I'm at work)] basically, I replaced line 90 with a call to 'config.getTarget().launch(launchParameters).waitFor()', the launchParameters themselves were retrieved in a call to 'config.getTarget().createLaunchParameters'.

See: https://github.com/robovm/robovm/blob/master/compiler/src/main/java/org/robovm/compiler/config/Config.java https://github.com/robovm/robovm/blob/master/compiler/src/main/java/org/robovm/compiler/target

I had meant to submit my libGDX version of shemnon's code to the libGDX project over the last week or so, but I've not had the time to clean it up or document it, plus, I've been monitoring this project and Marius's advances, and I have to say, barring the inclusion of Maven* code (phhhh!), this project is probably at a lot more advance stage than my 'proof of concept'.

*BTW, was directly embedding the Maven 3 runtime, programmatically, into Gradle ever considered? I have some Gradle test code that attempts to do just this, that could be extremely flexible and allow out-of-the-box usage of pre-existing non-Gradle build tools.

mariusk commented 10 years ago

FWIW, I've added support to libgdx for native libraries using this plugin here https://github.com/mariusk/libgdx/commit/01185f0b2900dc9730ae9431819b56773804b954 and issued a pull request to the main libgdx project on github. Everything works great at my end, so barring any major issues from the official libgdx maintainers it should go into the daily builds hopefully soon.