jMonkeyEngine / sdk

The jMonkeyEngine3 Software Development Kit based on Netbeans
BSD 3-Clause "New" or "Revised" License
314 stars 101 forks source link

Expand new Gradle project wizard to support Android development #498

Open tonihele opened 1 year ago

tonihele commented 1 year ago

Expand new Gradle project wizard to support Android development. Yeah, this is something that I know nothing about. And I do not know is this sufficient or is there something else required to give Android developers a boost. But seems that the wizard should ask first that desktop or Android. Some packages can't be used on Android and the are some differences in the build.gradle. Essentially the jMonkeyInitializer can be monkeyed off for example.

Here is a related thread on the forums: https://hub.jmonkeyengine.org/t/running-android-error-java-lang-noclassdeffounderror-sun-misc-base64encoder/46685

peedeeboy commented 1 year ago

I like the LibGDX project layout: https://libgdx.com/wiki/start/project-generation#project-layout

Similar to the jMonkeyInitializer project layout (Core project + launcher projects for desktop, Andriod, iOS), but with the addition of a dedicated /assets project, which the Initializer doesn't have.

I think the dedicated /assets project is good because a) the Asset Manager in the SDK already has it in its classloader b) If you have published a game to Steam or similar, the assets don't/won't need to be downloaded/updated for users as part of a code only update?

I didn't go down this road, as I also have 0 experience of developing for Android / iOS, and didn't have the confidence for such a change

MeFisto94 commented 1 year ago

But seems that the wizard should ask first that desktop or Android

We could also support both, probably. You could have a commons library, desktop and android specific jars and potentially also three asset jars (commons, desktop, android)

I don't know how real that usecase is, though. More often, you'd go for an app and probably in the future make the app run natively via windows 11