Skip to content

Instantly share code, notes, and snippets.

@sohamtriveous
Last active February 1, 2017 16:36
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save sohamtriveous/c381e85ab3949af083b2 to your computer and use it in GitHub Desktop.
Save sohamtriveous/c381e85ab3949af083b2 to your computer and use it in GitHub Desktop.
A sample RxJava-Android and retrolambda gradle configuration for Android Studio on Mac OS.
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.databaseexample"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'LICENSE'
exclude 'LICENSE.txt'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'me.tatarka:gradle-retrolambda:3.0.1'
}
}
repositories {
mavenCentral()
}
apply plugin: 'me.tatarka.retrolambda'
retrolambda {
jdk '/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home'//System.getenv("JAVA_8")
oldJdk System.getenv("JAVA_HOME")
javaVersion JavaVersion.VERSION_1_7
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.0'
compile 'io.reactivex:rxandroid:0.24.0'
// other dependencies (not relevant to this example)
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.google.code.gson:gson:2.3'
androidTestCompile 'com.android.support.test:runner:0.2'
androidTestCompile 'com.android.support.test:rules:0.2'
androidTestCompile 'org.assertj:assertj-core:1.7.1'
androidTestCompile 'com.squareup.assertj:assertj-android:1.0.0'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.1'
androidTestCompile 'com.android.support:support-annotations:22.1.0'
testCompile 'junit:junit:4.12'
testCompile 'com.android.support.test:runner:0.2'
testCompile 'com.android.support.test:rules:0.2'
testCompile 'org.assertj:assertj-core:1.7.1'
testCompile 'com.android.support:support-annotations:22.1.0'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment