EmergentOrganization / cell-rpg

:black_square_button: connect to a universe where cellular automata have run rampant
http://emergentorganization.github.io/bridge/
Other
12 stars 1 forks source link

Fix travis CI #118

Open orelb opened 7 years ago

orelb commented 7 years ago

Fix for #114

7yl4r commented 7 years ago

I'll confirm this builds for me and merge it tonight

7yl4r commented 7 years ago

I am getting an error when trying to build the desktop game:

* Information:Gradle: Executing tasks: [:core:assemble, :desktop:assemble]
* Information:10/6/2017 2:49 AM - Compilation completed with 1 error and 0 warnings in 57s 702ms
* C:\Users\7yl4r\Documents\cell-rpg\build.gradle
     Error:(79, 0) Gradle: A problem occurred evaluating root project 'cell-rpg'.
        > java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0

Looking at the diff, my best guess is that this is the change to newer android build tools version in android/build.gradle saying it needs java 8. Then again I don't know why adroid/build.gradle would be running when I'm only trying to compile and run the desktop app - gradle is still pretty mysterious to me.

As for a solution: I could set up java 8 of course, however I had a very vague memory there was a reason we stuck with 7 so I searched through the chat logs and found this snippet:

image

So that doesn't tell us much, but there was a compatibility issue... but has that issue been resolved over the past 2 years?

I looked through libgdx's news and saw no mention of java 8, but did find that android's compiler has only recently started supporting java 8. It is possible that this removed the only roadblock keeping us from using java 8, but I don't know enough about the original issue to say.

I think we need to verify that libgdx can build to android using java 8 before upgrading.

orelb commented 7 years ago

It looks as only a subset of Java 8 features are supported on Android.

In order to use these, we need to upgrade the android gradle plugin. I'm not sure how that effects the android version we are targeting. I will research further.

However, if we choose to not upgrade there are some available backports: retrolambda, streamsupport.

Libgdx should build just fine as long as the code builds correctly by the android plugin.

7yl4r commented 7 years ago

I am not attached to any particular version, and I don't need any java 8 features. Whatever is the easiest route to a configuration that allows us to build locally to android, desktop, and work with travis is fine by me.

My environment is set up with java 7 and an older android sdk, which is why I'm getting an error with this configuration. We need to try building with newer tools and hopefully it will work just fine.

If that is the case then I guess we may run into errors in the future if we implement something in java 8 not supported on android, and I think that's easy to work around.

7yl4r commented 6 years ago

I keep meaning to set up a java 8 environment and test this, but keep putting it off.