With the dependency handling out of the way, the actual maven can now be configured: build.gradle
import com.valtechmobilitty.gradle.credentials.onepassword.OnepasswordAccessCredentials // Singleton improves performance as accessing the cli is quite slow: final def securedMavenCredentials = new OnepasswordAccessCredentials("Example Work Credentials")import com.valtechmobilitty.gradle.credentials.onepassword.OnepasswordAccessPasswordCredentialsfinal def securedMavenCredentials = new OnepasswordAccessPasswordCredentials("Example Work Credentials")allprojects { repositories { maven { url = "https://maven.yourcompany.com/example" configuredCredentials = securedMavenCredentials authentication { basic(BasicAuthentication) } } } }
0 commit comments