Skip to content

Commit

Permalink
Don't be an absolute goddamn moron when replacing tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
Aizistral committed Aug 10, 2021
1 parent f635cdb commit 90884f0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -9,7 +9,7 @@ apply plugin: "maven"
apply plugin: 'maven-publish'

group = 'com.integral.grimoire'
version = '1.5.2'
version = '1.5.3'
archivesBaseName = 'GrimoireShenanigans'

targetCompatibility = sourceCompatibility = '1.8'
Expand Down
13 changes: 12 additions & 1 deletion src/main/java/com/integral/grimoire/GrimoireShenanigans.java
Expand Up @@ -270,7 +270,18 @@ protected void applyGrimoireShenanigans() {
tokenMap.put("MIXIN_REFMAP", this.getMixinRefmapName());
propertyMap.put("tokens", tokenMap);

processResources.filter(propertyMap, ReplaceTokens.class);
processResources.eachFile(file -> {
String name = file.getName();

if (name != null) {
if (name.endsWith(".json") || name.endsWith(".txt") || name.endsWith(".info") ||
name.endsWith(".cfg") || name.endsWith(".toml") || name.endsWith(".yml") ||
name.endsWith(".java") || name.endsWith(".kts") || name.endsWith(".gradle")) {

file.filter(propertyMap, ReplaceTokens.class);
}
}
});

// Also in project sources
this.extraShenanigans.addSourceReplacements();
Expand Down

0 comments on commit 90884f0

Please sign in to comment.