android: copy the extra java files to the right directory
authorAlexis Laferrière <alexis.laf@xymus.net>
Thu, 17 Jul 2014 14:49:48 +0000 (10:49 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 31 Jul 2014 12:21:18 +0000 (08:21 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/android_platform.nit

index de0bec5..b06e2d2 100644 (file)
@@ -19,6 +19,7 @@ module android_platform
 import platform
 import abstract_compiler
 import common_ffi
+intrude import common_ffi::extra_java_files
 import android_annotations
 
 redef class ToolContext
@@ -120,6 +121,14 @@ class AndroidToolchain
                        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/"
                """