From f9b69c1c25c06daf58c16693fcf93b10922d8cdd Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Tue, 4 Jun 2019 15:28:13 +0100 Subject: [PATCH] JAL-3287 adjustment to HelpLinksChecker to run in Windows and improvement to build.gradle --- build.gradle | 3 ++- utils/HelpLinksChecker.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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)) -- 1.7.10.2