src/doc: introduce option --no-render in HTML phase.
[nit.git] / src / platform / android.nit
index a925c88..1a6f458 100644 (file)
@@ -260,9 +260,9 @@ $(call import-module,android/native_app_glue)
                # Copy assets, resources and libs where expected by the SDK
 
                var project_root = "."
-               var mproject = compiler.mainmodule.first_real_mmodule.mproject
-               if mproject != null then
-                       var root = mproject.root
+               var mpackage = compiler.mainmodule.first_real_mmodule.mpackage
+               if mpackage != null then
+                       var root = mpackage.root
                        if root != null then
                                var filepath = root.filepath
                                if filepath != null then
@@ -337,11 +337,16 @@ $(call import-module,android/native_app_glue)
                        var tsa_server= "TSA_SERVER".environ
 
                        if key_alias.is_empty then
-                               toolcontext.error(null,
-                                       "Error: the environment variable `KEY_ALIAS` must be set to use the `--release` option on Android projects.")
+                               toolcontext.warning(null, "key-alias",
+                                       "Warning: the environment variable `KEY_ALIAS` is not set, the APK file will not be signed.")
+
+                               # Just move the unsigned APK to outname
+                               args = ["mv", apk_path, outname]
+                               toolcontext.exec_and_check(args, "Android project error")
                                return
                        end
 
+                       # We have a key_alias, try to sign the APK
                        args = ["jarsigner", "-sigalg", "MD5withRSA", "-digestalg", "SHA1", apk_path, key_alias]
 
                        ## Use a custom keystore