Merge: Android: select the low-level implementations from other importations
authorJean Privat <jean@pryen.org>
Tue, 17 May 2016 15:04:34 +0000 (11:04 -0400)
committerJean Privat <jean@pryen.org>
Tue, 17 May 2016 15:04:34 +0000 (11:04 -0400)
commit40d874c4d0b6e81e512bf501a9031c0f2c4cb8c7
treec215cff58d8255e2598cfb5b6a5b073dbe342521
parent31869bbc0125c7edb775c70779da70a8e846713d
parent70c0e4933505a4f0031f89e92295aa8fc3d6353e
Merge: Android: select the low-level implementations from other importations

This PR needs some context first: there is two low-level implementations for Nit apps on Android. The oldest is based on C code and `native_app_glue`, it is used by all our game engines. The new one is based on a custom Java class `NitActivity`, it is used to implement `app::ui` and should replace the oldest one when I have time to work on it.

Prior to this PR, importing `android` imported the old C implementation, and you had to import `android::ui` to get the Java implementation.

This PR changes this behavior and uses conditional importations to choose between the two low-level implementations. So importing `android` and `gamnit` uses the old C implementation (now `android::game`) and importing `android` and `app::ui` uses the new Java implementation (`android::nit_activity`).

This allows us to use the simple `nitc src/calculator.nit -m android`, instead of `nitc src/calculator.nit -m ../../lib/android/ui.nit`. And the most important is that the user doesn't have to chose between (or understand) the two low-level implementations.

Pull-Request: #2093
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>