Gradle Propertly CLI Overrides Not Working #70
-
|
Overriding grade properties via the CLI does not appear to be working. In our case we were overriding the version and the auth token for publishing to GitHub, which was working in v2.x: For v3.x neither of these CLI overrides are working anymore (we swapped Neither of these CLI properties are applied when building the NPM package. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
|
As per the docs:
So this is working as intended. If you wish to maintain some default value which you then override from the cli, may I suggest using gradle.properties file for that? |
Beta Was this translation helpful? Give feedback.
-
|
Here's the setup you need to unlock cli overrides npmPublish {
registries {
github {
access.set(RESTRICTED)
}
}
}I've also removed explicit URI as github registry shortcut already sets that for you. |
Beta Was this translation helpful? Give feedback.
-
|
@mpetuska following up to let you know we removed the placeholder property values from the grade file (that were needed in older versions) and now the CLI overrides are working fine. Thank you! 🎉 |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for letting me know |
Beta Was this translation helpful? Give feedback.
As per the docs:
So this is working as intended. If you wish to maintain some default value which you then override from the cli, may I suggest using gradle.properties file for that?