paulirotta / Tantalum

Tantalum Cross Platform Library
12 stars 6 forks source link

Remove "android stubs" from the main project #37

Closed vivainio closed 11 years ago

vivainio commented 11 years ago

It's not really clear what the function of stuff like java.net.* in the project is. We should look for a way to remove them (e.g. build different jar for jme and android)

paulirotta commented 11 years ago

Yes, they used to be a separate project and the request was simplify to move it in :)

I agree and will pull those out again into a "stubs" JAR, keeps the Javadocs more sane.

Note that would could stub the JME APIs also for equivalence and thus make this much easier for pure Android developers to step. Must consider.

vivainio commented 11 years ago

Do we have a good reason for stubs to exist in the first place? It seems quite possible to isolate platform specific stuff to platform specific files, so that JME code would never even see the Android specific imports/classes, and vice versa.

paulirotta commented 11 years ago

Stubs: Tantalum won't compile with Android references unless you have an Android SDK installed, and we did not want to require Android SDK to use it. When you build JME apps, things just work. When you build Android apps, it just works as long as the classpath has Tantalum.JAR is after the Android SDK JAR that provides real implementations not stubs.

There are also issues with Proguard. If I recall we must add two command line parameters to make a no-stub app obfuscate.

I propose the following step 1, then we can refine from there.

I'll move the stubs into a separate JAR and include that into the Tantalum.jar at build time. The size difference is really trivial and no one will know-care that it is there. If later tests show a reliable way to eliminate the stub entirely after JAR build time, happy day, but let's test some obfuscated apps to be sure.

vivainio commented 11 years ago

Can possibly be solved by #46

paulirotta commented 11 years ago

Stubs are eliminated entirely.

Android.jar is now needed for the complete source package build, but not needed for normal development on JME.

JME jars are needed for JME development but not if working only on Android