import platform
import abstract_compiler
import common_ffi
+intrude import common_ffi::extra_java_files
import android_annotations
redef class ToolContext
icon_declaration = "android:icon=\"@drawable/icon\""
else icon_declaration = ""
+ # Also copy over the java files
+ dir = "{android_project_root}/src/"
+ var extra_java_files = compiler.mainmodule.extra_java_files
+ if extra_java_files != null then for file in extra_java_files do
+ var path = file.filename
+ path.file_copy_to("{dir}/{path.basename("")}")
+ end
+
## Generate delagating makefile
dir = "{android_project_root}/jni/"
"""
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], "Android project error")
+ toolcontext.exec_and_check(["ndk-build", "-s", "-j", "-C", android_project_root], "Android project error")
# Generate the apk
var args = ["ant", "-q", "-f", android_project_root+"/build.xml"]