X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=build.gradle;h=985cc87d1fc549ea16cb561d9a60409f9517e17a;hb=refs%2Fheads%2Fspike%2FJAL-3622_Scanner_swingjs_J212_merge;hp=d955de332c6575cf33fbbe79689f639477167e68;hpb=06cc168f208017912e21e64cb9d25e1657d83cb4;p=jalview.git diff --git a/build.gradle b/build.gradle index d955de3..985cc87 100644 --- a/build.gradle +++ b/build.gradle @@ -804,11 +804,12 @@ task cleanClover { 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") } @@ -1423,6 +1424,11 @@ task getdown() { } +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} + + clean { doFirst { delete getdownWebsiteDir @@ -1818,13 +1824,14 @@ task jalviewjsEclipsePaths { 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" @@ -2203,11 +2210,11 @@ def jalviewjsCallCore(String name, FileCollection list, String prefixFile, Strin 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 { @@ -2216,7 +2223,7 @@ def jalviewjsCallCore(String name, FileCollection list, String prefixFile, Strin logOutFile.append(msg+"\n") } } - coreFile.append( coreBottom.text ) + coreFile.append( coreBottom.getText("UTF-8") ) msg = "Generating ${zjsfile}" println(msg) @@ -2225,8 +2232,10 @@ def jalviewjsCallCore(String name, FileCollection list, String prefixFile, Strin 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"