Can an AAR include transitive dependencies? [duplicate]

It took a little while but I found what I was looking for. It just happened to be the way I was wording my searches. This lesser-seen answer was exactly what I was looking for: Transitive dependencies not resolved for aar library using gradle Note that dependencies are only associated with aar libraries if they … Read more

Conflict with dependency ‘com.android.support:support-annotations’. Resolved versions for app (23.1.0) and test app (23.0.1) differ

You can force the annotation library in your test using: androidTestCompile ‘com.android.support:support-annotations:23.1.0’ Something like this: // Force usage of support annotations in the test app, since it is internally used by the runner module. androidTestCompile ‘com.android.support:support-annotations:23.1.0’ androidTestCompile ‘com.android.support.test:runner:0.4.1’ androidTestCompile ‘com.android.support.test:rules:0.4.1’ androidTestCompile ‘com.android.support.test.espresso:espresso-core:2.2.1’ androidTestCompile ‘com.android.support.test.espresso:espresso-intents:2.2.1’ androidTestCompile ‘com.android.support.test.espresso:espresso-web:2.2.1’ Another solution is to use this in the top … Read more

How do I read properties defined in local.properties in build.gradle

You can do that in this way: Properties properties = new Properties() properties.load(project.rootProject.file(‘local.properties’).newDataInputStream()) def sdkDir = properties.getProperty(‘sdk.dir’) def ndkDir = properties.getProperty(‘ndk.dir’) Use project.rootProject if you are reading the properties file in a sub-project build.gradle: . ├── app │   ├── build.gradle <– You are reading the local.properties in this gradle build file │   └── src ├── … Read more

Android buildscript repositories: jcenter VS mavencentral

At Bintray I just rebloged a very detailed blog post describing the reasons why Google made this change. Here are the most important points: JCenter is a Java repository in Bintray, which is the largest repo in the world for Java and Android OSS libraries, packages and components. All the content in JCenter is served … Read more