in my init.gradle
i use EnterpriseRepositoryPlugin
with System.properties['someValue']
which is discouraged due to configuration caching ( Configuration cache )
Now my issue is using providers.environmentVariable('someValue')
inside void apply
does not work, it cannot be accessed. On the global level in init.gradle
it is accessible.
class EnterpriseRepositoryPlugin implements Plugin<Gradle> {
void apply(Gradle gradle) {
gradle.settingsEvaluated { settings ->
// old variant
// System.properties['someValue']
// not working
providers.environmentVariable('someValue')
}
}
}
Any ideas how to access providers
?