Please, help me to find the best solution for my problem:
In private LAN-network I have nexus repositories, and i need to use one user for getting access to repos.
The simplest solution is to add user and password to gradle.properties
file and in every build.gradle
file and every repo write the same code:
maven {
credentials {
username "$mavenUser"
password "$mavenPassword"
}
url 'https://maven.yourcorp1.net/'
}
maven {
credentials {
username "$mavenUser"
password "$mavenPassword"
}
url 'https://maven.yourcorp2.net/'
}
Where mavenUser and mavenPassword in gradle.properties
are the same for all repositories:
mavenUser=admin
mavenPassword=admin123
It's all good and works fine, but there is a lot of duplicate code.
Maybe you know - how in one place set same credentials for all maven repositories? I don't want to copy the same code for all repositories.
Thanks you a lot!