If we need to hide the password or any other confidential information, we can move the info into gradle global properties. To do so, we put the info in the file at $GRADLE_HOME/gradle.properties. If it doesn't exist just create a new one.
Here is the content of file %GRADLE_HOME/gradle.properties.
signing.keyId=1C5E1752
signing.password=topsecret
signing.secretKeyRingFile=C:/Users/xxx/AppData/Roaming/gnupg/secring.gpg
artifactoryAndroidDev=http://artifactory.dev.cba/artifactory/android-dev/
artifactoryUsername=xxx
artifactoryPassword=topsecret
nexusSnapshotRepo=http://localhost:8081/nexus/content/repositories/snapshots/
nexusReleaseRepo=http://localhost:8081/nexus/content/repositories/releases/
nexusUsername=admin
nexusPassword=xxx
The we refer the info in the build.gradle file. Here is the gradle build file I used to install slidingmenu library.
buildscript {
repositories {
mavenCentral()
maven {
url 'http://localhost:8081/nexus/content/repositories/central/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
}
apply plugin: 'android-library'
repositories {
maven {
url 'http://localhost:8081/nexus/content/repositories/central/'
}
}
dependencies {
compile 'com.android.support:support-v4:18.0.+'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
}
android {
compileSdkVersion 19
buildToolsVersion "18.1.1"
defaultConfig {
minSdkVersion 7
targetSdkVersion 19
}
sourceSets {
main {
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
manifest.srcFile 'AndroidManifest.xml'
}
}
}
apply plugin: 'maven'
apply plugin: 'signing'
version = "1.3-release"
group = "com.jeremyfeinstein"
configurations {
archives {
extendsFrom configurations.default
}
}
//Singing the library for release version.
signing {
required { version.contains("release") && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
uploadArchives {
configuration = configurations.archives
repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
//nexusReleaseRepo, nexusUsername and nexusPassword are defined in gradle global properties which are stored in $GRADLE_HOME/gradle.properties.
repository(url: nexusReleaseRepo) {
authentication(userName: nexusUsername, password: nexusPassword)
}
pom.project {
name 'Android SlidingMenu Library'
packaging 'aar'
description 'Sliding menu library for Android applications'
url 'https://github.com/jfeinstein10/SlidingMenu'
// scm {
// url 'scm:git@github.com:VandalSoftware/android-cache-lib.git'
// connection 'scm:git@github.com:VandalSoftware/android-cache-lib.git'
// developerConnection 'scm:git@github.com:VandalSoftware/android-cache-lib.git'
// }
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'jfeinstein10'
name 'Jeremy Feinstein'
email 'jfeinstein10@gmail.com'
}
}
}
}
}
This comment has been removed by the author.
ReplyDelete
ReplyDeleteHi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.
angularjs-Training in velachery
angularjs-Training in annanagar
angularjs Training in chennai
angularjs Training in chennai
Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
ReplyDeleteadvanced excel training in bangalore
I would assume that we use more than the eyes to gauge a person's feelings. Mouth. Body language. Even voice. You could at least have given us a face in this test.
ReplyDeleteJava training in Chennai | Java training in Bangalore
Java online training | Java training in Pune
Great content with an excellent idea!!! Thanks for sharing.
ReplyDeleteSelenium training in Chennai
Selenium Courses in Chennai
best ios training in chennai
.Net coaching centre in chennai
French Classes in Chennai
Big Data Training in Chennai
Qtp course in Chennai
Best qtp training institute in Chennai
Very good brief and this post helped me alot. Say thank you I searching for your facts. Thanks for sharing with us!
ReplyDeletedevops online training
aws online training
data science with python online training
data science online training
rpa online training
Pleasant Tips..Thanks for Sharing….We keep up hands on approach at work and in the workplace, keeping our business pragmatic, which recommends we can help you with your tree clearing and pruning in an invaluable and fit way.
ReplyDeleteMicrosoft Azure online training
Selenium online training
Java online training
Python online training
uipath online training
The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. The angular js programming language is very popular which are most widely used.
ReplyDeleteDot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery
digital marketing company
ReplyDeleteecommerce service company
shopify website development
prestashop development
계룡콜걸
ReplyDelete양주콜걸
양주콜걸
천안콜걸
봉화콜걸
공주콜걸
아산콜걸