Reputation: 13
I've just got access to a repository on Bitbucket, company based, and now I need to clone the repository, and then work with on Android Studio, all running on Win7.
The instructions I was given was to install Gradle, and then clone the repository using the "clone gitxxxxx" command. I tried running the command on terminal/powershell and it said "command git not found", so I installed Git.
When I ran it, I could clone the repository, but on the last step, "gradle assembleBeta", it bombs out by saying something about credentials.
I was given a set of credentials (mavenUser/mavenPassword) and told to put this in my "local gradle.properties" folder. I've searched high and low, looked through tons of threads, and I still haven't found anything to help me find where to put these credentials file.
I know it's supposed to be in the "/.gradle/gradle.properties:" file, but where is this file? I found a .gradle folder in my documents folder, but no gradle.properties file.
I'm not sure if my intial setup is to blame or etc, but when I tested everything (Android Studio, Gradle, Git) everything seemed fine.
Upvotes: 1
Views: 2589
Reputation: 4111
You have to create the gradle.properties
file in the .gradle
folder. The location of this folder can be configured by altering the environment variable GRADLE_USER_HOME
. This will be where all external dependencies are cached locally, and where your builds will be stored when you run gradle install
.
Inside your file, you should have the following:
mavenUser=userNameProvided
mavenPassword=passwordProvided
Any properties added to the gradle.properties file applies to every gradle project. You can also add project specific gradle.properties files by putting them at the root of your gradle project. More details can be found here: https://gradle.org/docs/current/userguide/build_environment.html
Upvotes: 1