compileJava {
-
+
+ sourceCompatibility = compile_source_compatibility
+ targetCompatibility = compile_target_compatibility
+ options.compilerArgs = additional_compiler_args
+ options.encoding = "UTF-8"
doFirst {
- sourceCompatibility = compile_source_compatibility
- targetCompatibility = compile_target_compatibility
- options.compilerArgs = additional_compiler_args
print ("Setting target compatibility to "+targetCompatibility+"\n")
}
}
+tasks.withType(JavaCompile) {
+ options.encoding = 'UTF-8'
+}
+
+
clean {
doFirst {
delete getdownWebsiteDir
eclipseProduct = "${eclipseRoot}/Contents/Eclipse/.eclipseproduct"
} else if (OperatingSystem.current().isWindows()) { // check these paths!!
if (file("${eclipseRoot}/eclipse").isDirectory() && file("${eclipseRoot}/eclipse/.eclipseproduct").exists()) {
- eclipseRoot += "/eclipse.exe"
+ eclipseRoot += "/eclipse"
}
- eclipseBinary = "${eclipseRoot}/eclipse"
+ eclipseBinary = "${eclipseRoot}/eclipse.exe"
eclipseProduct = "${eclipseRoot}/.eclipseproduct"
} else { // linux or unix
if (file("${eclipseRoot}/eclipse").isDirectory() && file("${eclipseRoot}/eclipse/.eclipseproduct").exists()) {
eclipseRoot += "/eclipse"
+println("eclipseDir exists")
}
eclipseBinary = "${eclipseRoot}/eclipse"
eclipseProduct = "${eclipseRoot}/.eclipseproduct"
def coreBottom = file(suffixFile)
coreFile.getParentFile().mkdirs()
coreFile.createNewFile()
- coreFile.write( coreTop.text )
+ coreFile.write( coreTop.getText("UTF-8") )
list.each {
f ->
if (f.exists()) {
- def t = f.text
+ def t = f.getText("UTF-8")
t.replaceAll("Clazz\\.([^_])","Clazz_${1}")
coreFile.append( t )
} else {
logOutFile.append(msg+"\n")
}
}
- coreFile.append( coreBottom.text )
+ coreFile.append( coreBottom.getText("UTF-8") )
msg = "Generating ${zjsfile}"
println(msg)
def logErrFOS = logOutFOS
javaexec {
- classpath = files(["${jalviewDir}/tools/closure_compiler.jar"])
- args = [ "--js", jsfile, "--js_output_file", zjsfile ]
+ classpath = files(["${jalviewDir}/${jalviewjs_closure_compiler}"])
+ main = "com.google.javascript.jscomp.CommandLineRunner"
+ jvmArgs = [ "-Dfile.encoding=UTF-8" ]
+ args = [ "--compilation_level", "SIMPLE_OPTIMIZATIONS", "--warning_level", "QUIET", "--charset", "UTF-8", "--js", jsfile, "--js_output_file", zjsfile ]
maxHeapSize = "2g"
msg = "\nRunning '"+commandLine.join(' ')+"'\n"