android_platform: use `outfile` instead of its own stuff
authorJean Privat <jean@pryen.org>
Tue, 15 Jul 2014 14:25:45 +0000 (10:25 -0400)
committerJean Privat <jean@pryen.org>
Tue, 15 Jul 2014 14:25:45 +0000 (10:25 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/android_platform.nit

index d5498d6..e8c8f97 100644 (file)
@@ -50,6 +50,8 @@ class AndroidToolchain
                return "{android_project_root}/jni/nit_compile/"
        end
 
+       redef fun default_outname(mainmodule) do return "{mainmodule.name}.apk"
+
        redef fun write_files(compiler, compile_dir, cfiles)
        do
                var android_project_root = android_project_root.as(not null)
@@ -236,8 +238,7 @@ $(call import-module,android/native_app_glue)
                toolcontext.exec_and_check(args, "Android project error")
 
                # Move the apk to the target
-               var outname = toolcontext.opt_output.value
-               if outname == null then outname = "{compiler.mainmodule.name}.apk"
+               var outname = outfile(compiler.mainmodule)
 
                var src_apk_suffix
                if release then