I am setting credentials in my build.gradle.kts fi...
# android
m
I am setting credentials in my build.gradle.kts file. But I want to read the credentials from a json or gradle file, because I want to integrate with Jenkins. I am also open other solutions.
Copy code
repositories {
    maven { setUrl("<https://urbanairship.bintray.com/android>") }
    maven { setUrl("<https://clojars.org/repo/>") }
    maven {
        setUrl("<https://jfrog.io/>...")
        credentials {
            username = "..."
            password = "...."
        }
    }
    mavenCentral()
}
c
You have lots of options available, such as using
gradle.properties
files, setting environment variables, and more. This page in their docs outlines all the ways to pass credentials to Gradle https://docs.gradle.org/current/userguide/build_environment.html
👍 2
m
I found this https://docs.gradle.org/current/userguide/kotlin_dsl.html#project_properties We can access global gradle.properties with "by project"
158 Views