@@ -306,7 +306,17 @@ public File createProject() throws IOException, SketchException {
306
306
commonRes = referenceLibraryProject (targetID , tmpFolder .getAbsolutePath (), "libs/cardboard_common" );
307
307
coreRes = referenceLibraryProject (targetID , tmpFolder .getAbsolutePath (), "libs/cardboard_core" );
308
308
if (audioRes && commonRes && coreRes ) {
309
- System .out .println ("Library projects referenced succesfully!" );
309
+ System .out .println ("Library projects referenced succesfully!" );
310
+ // Finally, re-write the build files so they use org.eclipse.jdt.core.JDTCompilerAdapter
311
+ // instead of com.sun.tools.javac.Main
312
+ // TODO: use the build file generated by the android tools, and
313
+ // add the custom section redefining the target
314
+ File audioBuildFile = new File (audioLibsFolder , "build.xml" );
315
+ writeBuildXML (audioBuildFile , "cardboard_audio" );
316
+ File commonBuildFile = new File (commonLibsFolder , "build.xml" );
317
+ writeBuildXML (commonBuildFile , "cardboard_common" );
318
+ File coreBuildFile = new File (coreLibsFolder , "build.xml" );
319
+ writeBuildXML (coreBuildFile , "cardboard_core" );
310
320
}
311
321
}
312
322
}
@@ -819,7 +829,7 @@ private void writeBuildXML(final File file, final String projectName) {
819
829
820
830
writer .println (" <echo message=\" ${build.compiler}\" />" );
821
831
822
- // Override target from maint android build file
832
+ // Override target from main android build file
823
833
writer .println (" <target name=\" -compile\" depends=\" -pre-build, -build-setup, -code-gen, -pre-compile\" >" );
824
834
writer .println (" <do-only-if-manifest-hasCode elseText=\" hasCode = false. Skipping...\" >" );
825
835
writer .println (" <path id=\" project.javac.classpath\" >" );
0 commit comments