protected override string GenerateCommandLineCommands() { // Running command: C:\Program Files (x86)\Java\jdk1.6.0_20\bin\javac.exe // "-J-Dfile.encoding=UTF8" // "-d" "bin\classes" // "-classpath" "C:\Users\Jonathan\Documents\Visual Studio 2010\Projects\AndroidMSBuildTest\AndroidMSBuildTest\obj\Debug\android\bin\mono.android.jar" // "-bootclasspath" "C:\Program Files (x86)\Android\android-sdk-windows\platforms\android-8\android.jar" // "-encoding" "UTF-8" // "@C:\Users\Jonathan\AppData\Local\Temp\tmp79c4ac38.tmp" //var android_dir = MonoDroid.MonoDroidSdk.GetAndroidProfileDirectory (TargetFrameworkDirectory); var cmd = new CommandLineBuilder(); cmd.AppendSwitchIfNotNull("-J-Dfile.encoding=", "UTF8"); cmd.AppendSwitchIfNotNull("-d ", ClassesOutputDirectory); cmd.AppendSwitchIfNotNull("-classpath ", Jars == null || !Jars.Any() ? null : string.Join(Path.PathSeparator.ToString(), Jars.Select(i => i.ItemSpec))); cmd.AppendSwitchIfNotNull("-bootclasspath ", JavaPlatformJarPath); cmd.AppendSwitchIfNotNull("-encoding ", "UTF-8"); cmd.AppendFileNameIfNotNull(string.Format("@{0}", TemporarySourceListFile)); cmd.AppendSwitchIfNotNull("-target ", JavacTargetVersion); cmd.AppendSwitchIfNotNull("-source ", JavacSourceVersion); return(cmd.ToString()); }
protected override void WriteOptionsToResponseFile(StreamWriter sw) { sw.WriteLine($"-d \"{ClassesOutputDirectory.Replace (@"\", @"\\")}\""); sw.WriteLine("-classpath \"{0}\"", Jars == null || !Jars.Any() ? null : string.Join(Path.PathSeparator.ToString(), Jars.Select(i => i.ItemSpec.Replace(@"\", @"\\")))); sw.WriteLine("-bootclasspath \"{0}\"", JavaPlatformJarPath.Replace(@"\", @"\\")); sw.WriteLine($"-encoding UTF8"); }