gradle-override-plugin icon indicating copy to clipboard operation
gradle-override-plugin copied to clipboard

Ability to separate property name with "_" for environment variables

Open szpak opened this issue 10 years ago • 4 comments

Bash, Fish and probably many other Linux shells don't allow to use . (dot) in an environment variable name. Therefore it is not possible to separate plugin name and property name.

export OVERRIDE_pitest.targetClasses=foo

bash: export: `OVERRIDE_pitest.targetClasses=foo': not a valid identifier

_ (underscore) could be used as an replacement.

szpak avatar Oct 17 '14 22:10 szpak

Underscore is also how Gradle specifies properties as environment variables: ORG_GRADLE_PROJECT__prop_=somevalue ( http://www.gradle.org/docs/current/userguide/tutorial_this_and_that.html)

On Fri, Oct 17, 2014 at 3:18 PM, Marcin Zajączkowski < [email protected]> wrote:

Bash, Fish and probably many other Linux shells don't allow to use . (dot) in an environment variable name. Therefore it is not possible to separate plugin name and property name.

export OVERRIDE_pitest.targetClasses=foo

bash: export: `OVERRIDE_pitest.targetClasses=foo': not a valid identifier

`_" (underscore) could be used as an replacement.

— Reply to this email directly or view it on GitHub https://github.com/nebula-plugins/gradle-override-plugin/issues/6.

quidryan avatar Oct 17 '14 22:10 quidryan

@szpak Would you be interested in working on a fix for this?

bmuschko avatar Oct 20 '14 23:10 bmuschko

@bmuschko I can add it to my open source project's contribution TODO list, but it is already very long and it would not have a high priority as I don't use mentioned feature. I just spotted it when I tested parameter quoting for #3.

szpak avatar Oct 24 '14 20:10 szpak

We are doing some housecleaning and we consider this plugin "feature complete". Since this is an enhancement, we will accept PR's but won't be able to prioritize this enhancement. Otherwise we will close this issue.

jmcgarr avatar Apr 18 '17 20:04 jmcgarr