gradle / foojay-toolchains

Java Toolchain Resolve Plugin based on the foojay DiscoAPI
Apache License 2.0
126 stars 16 forks source link

Plugin usage behind artifactory proxy #39

Open awaizman1 opened 1 year ago

awaizman1 commented 1 year ago

Hi,

In my organization, build machines can't access public internet. Usually we use on-prem artifactory repository with multiple proxy repos (for dockers, helm, etc.) and configure our build to use this artifactory.

I would like to set up a proxy for foojay disco and configure the plugin root url to this proxy.

Seems like the root url is hard coded within the plugin and this is not possible.

Kindly would you add a configuration option to set the root url?

For example, before gradle 8 it was possible to set in gradle.properties:

org.gradle.jvm.toolchain.install.adoptopenjdk.baseUri=https://<my on-prem artifactory>/.../adoptopenjdk-proxy

Suggestion something like:

toolchainManagement {
  jvm {
    javaRepositories {
      repository('foojay') {
        resolverClass = org.gradle.toolchains.foojay.FoojayToolchainResolver
        rootUrl = 'https://...'
      }
    }
  }
}

Thanks.

aleksanderlech commented 1 year ago

Hello, any plans for implementing such possibility in the future?

jbartok commented 1 year ago

Thank you for your interest in Gradle!

This feature request is in the backlog of the relevant team, but this area of Gradle is currently not in focus. It might take a while before it gets implemented.


Contributions are welcome though!