forked from etiennestuder/gradle-credentials-plugin
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
27 lines (21 loc) · 770 Bytes
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "nu.studer:gradle-credentials-plugin:$credentialsPluginVersion"
}
}
apply plugin: 'base'
apply plugin: 'nu.studer.credentials'
group = 'org.example'
version = '0.0.1'
// read credentials at build time, assuming credentials have already been
// written to the file system through Gradle task before via
// gradle addCredentials -PcredentialsKey=someAccountUsername -PcredentialsValue=chocolate
println "Username: " + credentials.someAccountUsername
// store credentials at build time without persistence to file system
credentials.someAccountPassword = 'secret!'
// read credentials at build time
println "Password: " + credentials.someAccountPassword
wrapper.gradleVersion = '1.12'