Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Versions managing of dependencies in Gradle
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.alexzh.temperatureconverter"
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
testCoverageEnabled true
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:appcompat-v7:$supportLibVersion"
compile "com.android.support:design:$supportLibVersion"
compile "com.android.support:preference-v14:$supportLibVersion"
//ButterKnife
compile "com.jakewharton:butterknife:$butterknifeLibVersion"
apt "com.jakewharton:butterknife-compiler:$butterknifeLibVersion"
//events
compile "org.greenrobot:eventbus:$eventbusLibVersion"
//di
compile "com.google.dagger:dagger:$daggerLibVersion"
apt "com.google.dagger:dagger-compiler:$daggerLibVersion"
provided 'javax.annotation:jsr250-api:1.0'
//retrofit
compile "com.squareup.retrofit2:retrofit:$retrofitLibVersion"
//gson
compile "com.squareup.retrofit2:converter-gson:$retrofitLibVersion"
//junit
testCompile "junit:junit:$junitLibVersion"
//mockito
testCompile "org.mockito:mockito-core:$mockitoLibVersion"
//espresso
androidTestCompile("com.android.support.test.espresso:espresso-core:$espresspLibVersion") {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile("com.android.support.test:runner:$testRunnerLibVirsion") {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile("com.android.support.test.espresso:espresso-intents:$espresspLibVersion") {
exclude group: 'com.android.support', module: 'support-annotations'
}
//uiautomator
androidTestCompile "com.android.support.test.uiautomator:uiautomator-v18:$uiautomatorLibVersion"
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}
allprojects {
repositories {
jcenter()
}
}
ext {
supportLibVersion = '25.0.0'
butterknifeLibVersion = '8.2.1'
daggerLibVersion = '2.0.2'
retrofitLibVersion = '2.1.0'
eventbusLibVersion = '3.0.0'
junitLibVersion = '4.12'
mockitoLibVersion = '1.10.19'
uiautomatorLibVersion = '2.1.2'
espresspLibVersion = '2.2.2'
testRunnerLibVirsion = '0.5'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment