Skip to content

Instantly share code, notes, and snippets.

@truongngoclinh
Last active July 2, 2022 12:20
  • Star 32 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save truongngoclinh/af143066468ec5456cea6867350331fe to your computer and use it in GitHub Desktop.
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools
defaultConfig {
applicationId "samples.linhtruong.com.ui_reactive_rxjava_realm"
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
versionCode versions.code
versionName versions.name
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
// added for instant-run optimization
maxProcessCount 4
javaMaxHeapSize "2g"
}
}
dependencies {
compile libraries.supportAppCompat
apt libraries.androidAnnotations
compile libraries.androidAnnotationsApi
}
ext.versions = [
code : 1,
name : '1.0',
minSdk : 16,
targetSdk : 23,
compileSdk : 23,
buildTools : '23.0.2',
// android
supportLibs : '23.4.0',
// 3rd
wire : '2.1.2',
dagger : '2.4',
javaxAnnotations : '1.2',
androidAnnotations: '4.1.0',
rxJava : '1.1.8',
rxAndroid : '1.2.0',
retrofit : '2.0.2',
okHttp : '3.2.0',
realm : '1.1.1',
gson : '2.6.2',
materialDialog : '0.8.5.9@aar',
robotoTextView : '2.5.0'
]
ext.libraries = [
// android
supportAnnotations : "com.android.support:support-annotations:$versions.supportLibs",
supportAppCompat : "com.android.support:appcompat-v7:$versions.supportLibs",
supportDesign : "com.android.support:design:$versions.supportLibs",
supportRecyclerView : "com.android.support:recyclerview-v7:$versions.supportLibs",
// 3rd
realm : "io.realm:realm-gradle-plugin:$versions.realm",
wire : "com.squareup.wire:wire-runtime:$versions.wire",
dagger : "com.google.dagger:dagger:$versions.dagger",
daggerCompiler : "com.google.dagger:dagger-compiler:$versions.dagger",
javaxAnnotations : "javax.annotation:javax.annotation-api:$versions.javaxAnnotations",
androidAnnotations : "org.androidannotations:androidannotations:$versions.androidAnnotations",
androidAnnotationsApi : "org.androidannotations:androidannotations-api:$versions.androidAnnotations",
rxJava : "io.reactivex:rxjava:$versions.rxJava",
rxAndroid : "io.reactivex:rxandroid:$versions.rxAndroid",
okHttp : "com.squareup.okhttp3:okhttp:$versions.okHttp",
okHttpLoggingInterceptor: "com.squareup.okhttp3:logging-interceptor:$versions.okHttp",
retrofit : "com.squareup.retrofit2:retrofit:$versions.retrofit",
retrofitGsonConverter : "com.squareup.retrofit2:converter-gson:$versions.retrofit",
retrofitRxJavaAdapter : "com.squareup.retrofit2:adapter-rxjava:$versions.retrofit",
materialDialog : "com.afollestad.material-dialogs:core:$versions.materialDialog",
robotoTextView : "com.github.johnkil.android-robototextview:robototextview:$versions.robotoTextView"
]
apply plugin: 'com.android.library'
apply plugin: 'realm-android'
android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools
defaultConfig {
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
versionCode versions.code
versionName versions.name
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile libraries.supportAppCompat
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: 'config.gradle'
buildscript {
apply from: 'config.gradle'
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
// realm
classpath libraries.realm
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
@HWilliamgo
Copy link

good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment