Created
July 19, 2014 00:17
-
-
Save JakeWharton/e8a3685feb6a94b23393 to your computer and use it in GitHub Desktop.
Adding support-annotations jar to a Java module.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
sourceCompatibility = JavaVersion.VERSION_1_7 | |
targetCompatibility = JavaVersion.VERSION_1_7 | |
def logger = new com.android.build.gradle.internal.LoggerWrapper(project.logger) | |
def sdkHandler = new com.android.build.gradle.internal.SdkHandler(project, logger) | |
for (File file : sdkHandler.sdkLoader.repositories) { | |
project.repositories.maven { | |
url = file.toURI() | |
} | |
} | |
dependencies { | |
compile 'com.android.support:support-annotations:20.0.0' | |
compile 'com.google.guava:guava:17.0' | |
compile 'com.squareup:javawriter:2.5.0' | |
testCompile 'junit:junit:4.11' | |
testCompile 'com.google.testing.compile:compile-testing:0.5' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Is there any way I can use this? My build.gradle file doesn't recognize neither the LoggerWrapper nor the SdkHandler. I'm trying to do a java test module based on Robolectric and square's assert-j android, but I need to testCompile the 'com.android.support:support-annotations:20.0.0'