HanSolo/charts

Allow to configure the Gradle project without knowledge about credentials

Opened this issue · 0 comments

Currently, just configuring (not executing) the Gradle build already requires credentials for publishing, as these are evaluated eagerly during configuration phase, see

charts/build.gradle

Lines 149 to 152 in 258f877

credentials {
username = null == ciOssrhUsername ? null == ossrhUsername ? null : ossrhUsername : ciOssrhUsername
password = null == ciOssrhPassword ? null == ossrhPassword ? null : ossrhPassword : ciOssrhPassword
}

and

charts/build.gradle

Lines 157 to 160 in 258f877

credentials {
username = null == ciGHUser ? null == ghUser ? null : ghUser : ciGHUser
password = null == ciGHToken ? null == ghToken ? null : ghToken : ciGHToken
}

To avoid that, it's probably better to follow the best practice of using the PasswordCredentials class with the built-in mySecureRepositoryUsername / mySecureRepositoryPassword properties.