From: Ben Soares Date: Tue, 4 Jun 2019 14:28:13 +0000 (+0100) Subject: JAL-3287 adjustment to HelpLinksChecker to run in Windows and improvement to build... X-Git-Tag: Release_2_11_1_0~52^2~8 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f9b69c1c25c06daf58c16693fcf93b10922d8cdd;p=jalview.git JAL-3287 adjustment to HelpLinksChecker to run in Windows and improvement to build.gradle --- diff --git a/build.gradle b/build.gradle index fb311a4..e099ef4 100644 --- a/build.gradle +++ b/build.gradle @@ -538,6 +538,8 @@ task compileLinkCheck(type: JavaCompile) { destinationDir = file("$jalviewDir/$utilsDir") source = fileTree(dir: "$jalviewDir/$utilsDir", include: ["HelpLinksChecker.java", "BufferedLineReader.java"]) + inputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.java") + inputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.java") outputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.class") outputs.file("$jalviewDir/$utilsDir/BufferedLineReader.class") } @@ -550,7 +552,6 @@ task linkCheck(type: JavaExec) { workingDir = jalviewDir def help = "$classes/$helpDir" args = [ "$classes/$helpDir", "-nointernet" ] - //args = [ "$classesDir/$helpDir", "-nointernet" ] doFirst { helplinkscheckeroutputfile.createNewFile() diff --git a/utils/HelpLinksChecker.java b/utils/HelpLinksChecker.java index 1279b31..3b64180 100644 --- a/utils/HelpLinksChecker.java +++ b/utils/HelpLinksChecker.java @@ -282,6 +282,7 @@ public class HelpLinksChecker implements BufferedLineReader.LineCleaner else { internalHrefCount++; + String relFile = System.getProperty("os.name").indexOf("Win") > -1 ? href.replace('/', '\\') : href; File hrefFile = href.equals("") ? htmlFile : new File(htmlFolder, href); if (hrefFile != htmlFile && !fileExists(hrefFile, href))