-
Notifications
You must be signed in to change notification settings - Fork 2.3k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom init.gradle and/or gradle.properties #6894
Comments
Is there any way to supply these properties using environment variables or CLI commands instead? Writing files is our least favorite way of doing things. |
Yes, Gradle also has |
BTW are you using the hosted app, or self-hosted? I'm assuming hosted but want to check. Our Gradle manager implementation is unique within Renovate because it (unfortunately) runs Gradle and fully resolves dependencies during the extract phase, rather than doing a light parse of the package manager files. We'd probably need to supply credentials during both the Gradle extract phase as well as the Maven version lookup phase. What type of host is the credentials for? e.g. is it a private maven registry/repository? |
Your assumption is correct, using the hosted app. The credentials are for a private maven repository. I already have them in a |
Reading in the doc that "Renovate (b) automatically detect during the manager extract phase which custom registries are in use." and here @rarkins writes "Our Gradle manager implementation is unique within Renovate because it (unfortunately) runs Gradle and fully resolves dependencies during the extract phase, rather than doing a light parse of the package manager files". However, for our project Spoon, the additional registry is not detected.
Consequently, we get a dependency lookup warning "Renovate failed to look up the following dependencies: Failed to look up maven package com.microsoft:z3." Why is the additional registry not detected? Is that a bug? |
The Gradle manager is now a parser. @Churro can you tell at a glance what's going wrong here? |
Repo extraction works correctly here but when renovate looks for The "real" gradle doesn't have this issue, as it doesn't try to list releases and just fetches z3-4.8.4.pom directly. @monperrus, not sure if you're aware but the trailing comma in your renovate.json renders the config invalid. |
renovate.json is invalid, see renovatebot/renovate#6894 (comment)
Thanks a lot @Churro
Done, see SpoonLabs/spoon-dependencies@4b8a7af
Oh, thanks, see INRIA/spoon#5203 It would be great to have a big warning in the dependency dashboard issue when |
it's probably valid because renovate is parsing all JSON config files as JSON5. 🤗 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
What would you like Renovate to be able to do?
Renovate needs a way to supply encrypted credentials to Gradle scripts.
Some of my projects store credentials in the global
~/.gradle/gradle.properties
file to avoid leaking them into version control. These properties are then read in the the Gradle scripts to access artifact repositories and resolve artifacts. Without them, the build scripts fail and Renovate is not able to resolve the artifact versions and determine if updates are required.Did you already have any implementation ideas?
It is currently possible to add an
npmrc
file so I thought it a natural enhancement for Gradle support to allow specifying either aninit.gradle
and/or agradle.properties
file. These could then be encrypted if they needed to include credentails.Are there any workarounds or alternative ideas you've tried to avoid needing this feature?
Not that I am aware of but if suggestions are made, I would be happy to test them.
Is this a feature you'd be interested in implementing yourself?
I've dabbled very little with TypeScript, but if pointed at the
npmrc
config implementation and where it would need to be copied, I might be able to come up with an implementation.The text was updated successfully, but these errors were encountered: