From 8f7b8beea06ea0258da3418a02c10342aecedc79 Mon Sep 17 00:00:00 2001 From: georgecao Date: Fri, 18 Mar 2022 19:55:55 +0800 Subject: [PATCH 1/3] Change DuplicatesStrategy from EXCLUDE to INHERIT --- jbake-core/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jbake-core/build.gradle b/jbake-core/build.gradle index a64a6f07..ca7c7e90 100644 --- a/jbake-core/build.gradle +++ b/jbake-core/build.gradle @@ -58,7 +58,7 @@ dependencies { processResources { from("src/main/resources") { - duplicatesStrategy = DuplicatesStrategy.EXCLUDE + duplicatesStrategy = DuplicatesStrategy.INHERIT include 'default.properties' expand jbakeVersion: project.version, timestamp: grgit.head().dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss'['VV']'")), From ffbc0c99fe418cad8f44005c35840df07fd47271 Mon Sep 17 00:00:00 2001 From: georgecao Date: Fri, 18 Mar 2022 20:08:58 +0800 Subject: [PATCH 2/3] Change DuplicatesStrategy from EXCLUDE to INCLUDE --- jbake-core/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jbake-core/build.gradle b/jbake-core/build.gradle index ca7c7e90..1296651c 100644 --- a/jbake-core/build.gradle +++ b/jbake-core/build.gradle @@ -58,7 +58,7 @@ dependencies { processResources { from("src/main/resources") { - duplicatesStrategy = DuplicatesStrategy.INHERIT + duplicatesStrategy = DuplicatesStrategy.INCLUDE include 'default.properties' expand jbakeVersion: project.version, timestamp: grgit.head().dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss'['VV']'")), From 973204ed248b3a8c54d67b3431ba958549cf1d96 Mon Sep 17 00:00:00 2001 From: georgecao Date: Tue, 29 Mar 2022 08:53:25 +0800 Subject: [PATCH 3/3] Stops the duplication and the need for a strategy at all. --- jbake-core/build.gradle | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/jbake-core/build.gradle b/jbake-core/build.gradle index 1296651c..820938c4 100644 --- a/jbake-core/build.gradle +++ b/jbake-core/build.gradle @@ -57,11 +57,9 @@ dependencies { } processResources { - from("src/main/resources") { - duplicatesStrategy = DuplicatesStrategy.INCLUDE - include 'default.properties' + filesMatching("default.properties") { expand jbakeVersion: project.version, - timestamp: grgit.head().dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss'['VV']'")), - gitHash: grgit.head().abbreviatedId + timestamp: grgit.head().dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss'['VV']'")), + gitHash: grgit.head().abbreviatedId } }