mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-03-10 05:39:19 +01:00
Fix WebAssetVersion.yml not being written with 'clean shadowJar'
This commit is contained in:
parent
a90f003462
commit
750428a033
@ -30,8 +30,9 @@ task updateVersion(type: Copy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
task determineWebAssetModifications {
|
task determineWebAssetModifications {
|
||||||
|
doLast {
|
||||||
|
mkdir "build/resources/main/assets/plan"
|
||||||
def versionFile = file("build/resources/main/assets/plan/WebAssetVersion.yml")
|
def versionFile = file("build/resources/main/assets/plan/WebAssetVersion.yml")
|
||||||
versionFile.parentFile.mkdirs()
|
|
||||||
versionFile.text = "" // Clear previous build
|
versionFile.text = "" // Clear previous build
|
||||||
ConfigurableFileTree tree = fileTree(dir: 'src/main/resources/assets/plan/web')
|
ConfigurableFileTree tree = fileTree(dir: 'src/main/resources/assets/plan/web')
|
||||||
tree.forEach { File f ->
|
tree.forEach { File f ->
|
||||||
@ -47,16 +48,17 @@ task determineWebAssetModifications {
|
|||||||
"%s: %s\n", relativePath.toString().replace('.', ','), modified
|
"%s: %s\n", relativePath.toString().replace('.', ','), modified
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
dependsOn determineWebAssetModifications
|
||||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||||
dependsOn updateVersion
|
dependsOn updateVersion
|
||||||
from 'build/sources/resources'
|
from 'build/sources/resources'
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
dependsOn determineWebAssetModifications
|
|
||||||
dependsOn processResources
|
dependsOn processResources
|
||||||
|
|
||||||
// Exclude these files
|
// Exclude these files
|
||||||
|
@ -72,7 +72,7 @@ public class WebAssetVersionCheckTask extends TaskSystem.Task {
|
|||||||
try {
|
try {
|
||||||
webAssetVersions.prepare();
|
webAssetVersions.prepare();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.warn("Could not read web asset versions, ", e);
|
logger.warn(String.format("Could not read web asset versions, %s", e.toString()));
|
||||||
logger.warn("Web asset version check will be skipped!");
|
logger.warn("Web asset version check will be skipped!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user