Issue Checklist
Affected Modules
Commons
Description
The VERSION_REVISION token in JDAUtilitiesInfo.java is never replaced during the build process, causing the literal string @VERSION_REVISION@ to appear in the published artifact.
Location: commons/src/main/java/com/jagrosh/jdautilities/commons/JDAUtilitiesInfo.java
|
public static final String VERSION_MAJOR = "@VERSION_MAJOR@"; |
|
public static final String VERSION_MINOR = "@VERSION_MINOR@"; |
|
public static final String VERSION_REVISION = "@VERSION_REVISION@"; |
Cause(?):
In build.gradle, the sourcesForRelease task only defines token replacements for VERSION_MAJOR and VERSION_MINOR, but not VERSION_REVISION:
task sourcesForRelease(type: Copy) {
from('src/main/java') {
filter(ReplaceTokens, tokens: [
VERSION_MAJOR: versionInfo.major,
VERSION_MINOR: versionInfo.minor
// VERSION_REVISION is missing!
])
}
into 'build/filteredSrc'
}
This may be related to #53 but not sure.
Impact:
When using JDAUtilitiesInfo.VERSION, the resulting string is malformed (e.g., 2.2.@VERSION_REVISION@ instead of 2.2.1).
Suggested Fix:
Add VERSION_REVISION to both the versionInfo map and the ReplaceTokens filter, sourcing the value appropriately (e.g., from git tags for releases).
Issue Checklist
Affected Modules
Commons
Description
The VERSION_REVISION token in JDAUtilitiesInfo.java is never replaced during the build process, causing the literal string @VERSION_REVISION@ to appear in the published artifact.
Location: commons/src/main/java/com/jagrosh/jdautilities/commons/JDAUtilitiesInfo.java
JDA-Chewtils/commons/src/main/java/com/jagrosh/jdautilities/commons/JDAUtilitiesInfo.java
Lines 28 to 30 in db6eaa5
Cause(?):
In build.gradle, the sourcesForRelease task only defines token replacements for VERSION_MAJOR and VERSION_MINOR, but not VERSION_REVISION:
This may be related to #53 but not sure.
Impact:
When using JDAUtilitiesInfo.VERSION, the resulting string is malformed (e.g., 2.2.@VERSION_REVISION@ instead of 2.2.1).
Suggested Fix:
Add VERSION_REVISION to both the versionInfo map and the ReplaceTokens filter, sourcing the value appropriately (e.g., from git tags for releases).