Skip to content

Instantly share code, notes, and snippets.

@beshkenadze
Created June 7, 2013 16:33
Show Gist options
  • Save beshkenadze/5730556 to your computer and use it in GitHub Desktop.
Save beshkenadze/5730556 to your computer and use it in GitHub Desktop.
Import library from maven repos via gradle
buildscript {
def projectRepositories = {
mavenCentral()
maven { url 'http://repo1.maven.org/maven2' }
maven {
url new File(System.properties['user.home'], '.m2/repository').toURI().toURL()
}
}
allprojects {
repositories projectRepositories
}
repositories projectRepositories
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
classpath "com.squareup:otto:1.3.3"
classpath "com.squareup.retrofit:retrofit:1.0.1"
classpath "commons-io:commons-io:2.4"
}
}
apply plugin: 'android'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile group: "com.squareup", name: "otto", version: "1.3.3"
compile group: "com.squareup.retrofit", name: "retrofit", version: "1.0.1"
compile group: "commons-io", name: "commons-io", version: "2.4"
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 15
targetSdkVersion 16
}
buildTypes {
debug {
packageNameSuffix ".debug"
versionNameSuffix "-debug"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment