build.gradle
buildscript { repositories { mavenCentral() } dependencies { "com.valtechmobility.gradle.credentials.onepassword:$CURRENT_VERSION""com.valtechmobility.gradle.plugin.credentials.onepassword:$CURRENT_VERSION"} }
With the dependency handling out of the way, the actual maven can now be configured: build.gradle
repositories { }
import com.valtechmobilitty.gradle.credentials.onepassword.OnepasswordAccessPasswordCredentials final def securedMavenCredentials = new OnepasswordAccessPasswordCredentials("Example Work Credentials") allprojects { repositories { maven { url = "https://maven.yourcompany.com/example" configuredCredentials = securedMavenCredentials authentication { basic(BasicAuthentication) } } } }
0 commit comments