Created
June 10, 2013 23:54
-
-
Save ikai/5753491 to your computer and use it in GitHub Desktop.
TIL: to get Gradle to use external Maven dependencies, you need to declare repositories OUTSIDE 'buildscript'. If you don't, you get an error telling you Gradle can't resolve whatever external dependencies your project depend on.
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
buildscript { | |
repositories { | |
maven { | |
url 'http://repo1.maven.org/maven2' | |
} | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.4' | |
} | |
} | |
repositories { | |
maven { | |
url 'http://google-api-client-libraries.appspot.com/mavenrepo' | |
} | |
maven { | |
url 'http://repo1.maven.org/maven2' | |
} | |
} | |
apply plugin: 'android' | |
dependencies { | |
// compile files('libs/android-support-v4.jar') | |
compile 'com.android.support:support-v4:13.0.0' | |
compile 'com.google.android.gms:play-services:3.1.36' | |
compile 'com.google.http-client:google-http-client-jackson2:1.13.1-beta' | |
compile 'com.google.apis:google-api-services-youtube:v3-rev24-1.13.2-beta' | |
compile 'com.google.oauth-client:google-oauth-client-jetty:1.13.1-beta' | |
} | |
android { | |
compileSdkVersion 17 | |
buildToolsVersion "17" | |
defaultConfig { | |
minSdkVersion 8 | |
targetSdkVersion 16 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment