shadow
shadow copied to clipboard
Relocating packages is also changing properties
Shadow Version
8.1.1
Gradle Version
8.8
Actual Behavior
I am trying to shadow oshi
and relocate it, for example to com.relocated
. The root package of oshi
is oshi
, which is also used in property names (e.g. oshi.util.proc.path
)
https://github.com/ektaarora3501/oshi/blob/b9ccae3c9072996e6a07286c19503c9e5dc44199/oshi-core/src/main/java/oshi/util/platform/linux/ProcUtil.java#L45
String str = GlobalConfig.get("oshi.util.proc.path", "/proc");
will be rewritten to
String str = GlobalConfig.get("com.relocated.oshi.util.proc.path", "/proc");
Expected Behavior
The above code is wrong since the names of properties in property files will not be changed.
I was just hit by the same issue.