Where to put Gradle configuration (i.e. credentials) that should not be committed?

I’m trying to deploy a Gradle-built artifact to a Maven repo, and I need to specify credentials for that. This works fine for now: uploadArchives { repositories { mavenDeployer { repository(url: “http://…/nexus/content/repositories/snapshots/”) { authentication(userName: “admin”, password: “admin123”) } } } } But I don’t like having to store the credentials in source control. With Maven, … Read more

How/when to generate Gradle wrapper files?

I am trying to understand how the Gradle Wrapper works. In many source repos, I see the following structure: projectRoot/ src/ build.gradle gradle.properties settings.gradle gradlew gradlew.bat gradle/ wrapper/ gradle-wrapper.jar gradle-wrapper.properties My questions: How/when does one generate gradlew/gradlew.bat? Are you supposed to generate them only one time when the project is first created, do you generate … Read more

Android Studio: Where is the Compiler Error Output Window?

When I ‘Run’ my project in Android Studio, in the ‘Messages’ window, I get: Gradle: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ‘:play01:compileDebug’. > Compilation failed; see the compiler error output for details. * Try: Run with –stacktrace option to get the stack trace. Run with –info or … Read more

gradlew: Permission Denied

I am attempting to run gradlew from my command line, but am constantly facing the following error. Brendas-MacBook-Pro:appx_android brendalogy$ ./gradlew compileDebug –stacktrace -bash: ./gradlew: Permission denied I am already running this command from my project directory. Need to run this command as I am facing the same (nondescriptive) error on Android Studio 0.2.x as encountered … Read more

How can I force gradle to redownload dependencies?

How can I tell gradle to redownload dependencies from repositories? 25 s 25 If you are using a recent version of Gradle, you can use –refresh-dependencies option. ./gradlew build –refresh-dependencies you can refer to the Gradle manual. The –refresh-dependencies option tells Gradle to ignore all cached entries for resolved modules and artifacts. A fresh resolve … Read more

What’s the difference between implementation, api and compile in Gradle?

After updating to Android Studio 3.0 and creating a new project, I noticed that in build.gradle there is a new way to add new dependencies instead of compile there is implementation and instead of testCompile there is testImplementation. Example: implementation ‘com.android.support:appcompat-v7:25.0.0’ testImplementation ‘junit:junit:4.12’ instead of compile ‘com.android.support:appcompat-v7:25.0.0’ testCompile ‘junit:junit:4.12′ What’s the difference between them and … Read more