libgdx.github.io icon indicating copy to clipboard operation
libgdx.github.io copied to clipboard

[Wiki] Using libGDX with Scala

Open myyk opened this issue 2 years ago • 2 comments

Hi there,

I'm just learning libGDX now and reading the docs and cross checking along the way, so I'm not yet comfortable to suggest an edit. I'm also new to Android and game programming.

I was reading https://libgdx.com/wiki/jvm-langs/using-libgdx-with-scala and it mentions:

In the dependencies include the scala library: compile "org.scala-lang:scala-library:2.11.12" (Scala 2.12.* requires java 8, but the majority of Android devices don’t support it)

From what I can tell, this is out of date. It seems to me like Android API level 33+ is required now - https://developer.android.com/google/play/requirements/target-sdk, which brings with it Java 11, I think. Also, I think Scala 2.13.11 and 3.3.0 seem to be mostly compatible with Java 8 and fully with later versions (Java 11).

Does anyone know if there are limitations that would make us not want to update the docs to suggest to use Scala 2.13.11 or 3.3.0?

myyk avatar Sep 07 '23 08:09 myyk

I don't think there are a lot of Scala users to be found around here. The wiki page has been basically unchanged since 2015 and the note about Java 8 was added in 2018.

Apparently, there were (and maybe still are?) some issues with Android and later Scala versions, see here for example. Most of those seem to be resolved now, but I think it'd be nice to verify that before we change anything on the wiki. Ideally, we'd rewrite the whole wiki page if someone gets libGDX and Scala running in 2023.

crykn avatar Sep 12 '23 20:09 crykn

I made some progress getting Scala 3 working with libgdx on Gradle but I was eventually defeated while trying to get R8 to dex the scala-library.jar.

My knowledge level for this was too limited and I switched to Kotlin so I'm not flying solo.

myyk avatar Sep 13 '23 02:09 myyk