shadow icon indicating copy to clipboard operation
shadow copied to clipboard

Relocating packages is also changing properties

Open sorin-florea opened this issue 3 months ago • 2 comments

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.

sorin-florea avatar Apr 23 '24 06:04 sorin-florea

I was just hit by the same issue.

vyazelenko avatar May 15 '24 10:05 vyazelenko