X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=build.gradle;h=67676c99f8a8fd6b5dea9c7e79485547a77d1347;hb=refs%2Fheads%2Fpatch%2FJAL-3847_gradleV7andV8Patches;hp=b2e9af101301ee97df46e743b3c2b6d154dd9945;hpb=daebef35c3c4d04cb1bb0e8a65548cf288358e23;p=jalview.git diff --git a/build.gradle b/build.gradle index b2e9af1..67676c9 100644 --- a/build.gradle +++ b/build.gradle @@ -35,6 +35,7 @@ repositories { } + // in ext the values are cast to Object. Ensure string values are cast as String (and not GStringImpl) for later use def string(Object o) { return o == null ? "" : o.toString() @@ -1141,13 +1142,12 @@ task linkCheck(type: JavaExec) { args = [ "${classesDir}/${help_dir}", "-nointernet" ] def outFOS = new FileOutputStream(helpLinksCheckerOutFile, false) // false == don't append - def errFOS = outFOS standardOutput = new org.apache.tools.ant.util.TeeOutputStream( outFOS, - standardOutput) + System.out) errorOutput = new org.apache.tools.ant.util.TeeOutputStream( outFOS, - errorOutput) + System.err) inputs.dir("${classesDir}/${help_dir}") outputs.file(helpLinksCheckerOutFile) @@ -1177,6 +1177,9 @@ jar { "Codebase": application_codebase } + duplicatesStrategy "EXCLUDE" + + destinationDir = file("${jalviewDir}/${package_dir}") archiveName = rootProject.name+".jar" @@ -1237,6 +1240,9 @@ shadowJar { manifest { attributes 'Implementation-Version': JALVIEW_VERSION } + + duplicatesStrategy "EXCLUDE" + mainClassName = shadow_jar_main_class mergeServiceFiles() classifier = "all-"+JALVIEW_VERSION+"-j"+JAVA_VERSION @@ -1704,6 +1710,7 @@ task installers(type: com.install4j.gradle.Install4jTask) { task sourceDist(type: Tar) { + dependsOn createBuildProperties def VERSION_UNDERSCORES = JALVIEW_VERSION.replaceAll("\\.", "_") def outputFileName = "${project.name}_${VERSION_UNDERSCORES}.tar.gz" @@ -1795,6 +1802,15 @@ task sourceDist(type: Tar) { // exclude(EXCLUDE_FILES) // exclude(PROCESS_FILES) // } + + from(file(buildProperties).getParent()) { + include(file(buildProperties).getName()) + rename(file(buildProperties).getName(), "build_properties") + filter({ line -> + line.replaceAll("^INSTALLATION=.*\$","INSTALLATION=Source Release"+" git-commit\\\\:"+gitHash+" ["+gitBranch+"]") + }) + } + }