Merge: Android release compilation mode
authorJean Privat <jean@pryen.org>
Fri, 16 May 2014 00:34:14 +0000 (20:34 -0400)
committerJean Privat <jean@pryen.org>
Fri, 16 May 2014 00:34:14 +0000 (20:34 -0400)
The --release option could also be used by pnacl.

Will need to specify usage in the Android and Nit manual. The resulting apk still needs to be signed and aligned before deployment.

Maybe add also suffix the package by ".debug". For now it can be done at the user level.

Pull-Request: #464
Reviewed-by: Jean Privat <jean@pryen.org>

1  2 
src/abstract_compiler.nit
src/android_platform.nit

Simple merge
@@@ -76,9 -76,9 +76,10 @@@ class AndroidToolchai
  
        redef fun write_files(compiler, compile_dir, cfiles)
        do
 +              var android_project_root = android_project_root.as(not null)
                var project = toolcontext.modelbuilder.android_project_for(compiler.mainmodule)
                var short_project_name = compiler.mainmodule.name
+               var release = toolcontext.opt_release.value
  
                var app_name = project.name
                if app_name == null then app_name = compiler.mainmodule.name
@@@ -241,7 -234,8 +240,9 @@@ $(call import-module,android/native_app
  
        redef fun compile_c_code(compiler, compile_dir)
        do
 +              var android_project_root = android_project_root.as(not null)
+               var release = toolcontext.opt_release.value
                # Compile C code (and thus Nit)
                toolcontext.exec_and_check(["ndk-build", "-s", "-j", "4", "-C", android_project_root])