Escape slashes when using gradle -P

I need to pass in a value which contains slashes to gradle project property via -P. However, slashes get converted to “_” when retrieving.

Example:
./gradlew -Pprop=abc/xyz

When calling rootProject.prop (or project.property("prop ") ), the value will be converterd to abc_xyz

Gradle version: 4.2