build.gradle 5.71 KB
Newer Older
Donald's avatar
Donald committed
1
apply plugin: 'com.android.application'
2
apply plugin: 'kotlin-android'
3
apply plugin: 'kotlin-android-extensions'
Donald's avatar
Donald committed
4 5

repositories {
Donald's avatar
Donald committed
6
    maven { url "https://dl.bintray.com/dasar/maven" }
7
    maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
Donald's avatar
Donald committed
8
    maven { url "https://jitpack.io" }
9
    mavenCentral()
Donald's avatar
Donald committed
10 11
}

Donald's avatar
Donald committed
12

Donald's avatar
Donald committed
13
android {
Donald's avatar
Donald committed
14
    compileSdkVersion project.sdkVersion
Donald's avatar
Donald committed
15
    defaultConfig {
Donald's avatar
Donald committed
16
        applicationId "org.horaapps.leafpic"
Donald's avatar
Donald committed
17
        minSdkVersion 19
Donald's avatar
Donald committed
18
        targetSdkVersion project.sdkVersion
Donald's avatar
Donald committed
19 20
        versionName "v0.7-alpha-2"
        versionCode 16
21
        vectorDrawables.useSupportLibrary = true
22
        multiDexEnabled true
Donald's avatar
Donald committed
23
    }
Donald's avatar
Donald committed
24

Donald's avatar
Donald committed
25 26 27
    lintOptions {
        disable 'MissingTranslation'
        disable 'ExtraTranslation'
28
        abortOnError false
Donald's avatar
Donald committed
29
    }
Donald's avatar
Donald committed
30

Donald's avatar
Donald committed
31 32 33 34
    dexOptions {
        jumboMode = true
    }

DNLDsht's avatar
DNLDsht committed
35 36 37 38
    // This is handled for you by the 2.0+ Gradle Plugin
    aaptOptions {
        additionalParameters "--no-version-vectors"
    }
Donald's avatar
Donald committed
39

Donald's avatar
Donald committed
40 41 42 43 44
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

Donald's avatar
Donald committed
45 46 47 48
    signingConfigs {
        release
    }

Donald's avatar
Donald committed
49 50
    buildTypes {
        release {
Donald's avatar
Donald committed
51
            minifyEnabled true
Donald's avatar
Donald committed
52
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
53
            resValue "string", "app_name", "LeafPic"
Donald's avatar
Donald committed
54
            signingConfig signingConfigs.release
55 56 57 58 59
        }

        debug {
            applicationIdSuffix ".debug"
            resValue "string", "app_name", "LeafPic (debug)"
Donald's avatar
Donald committed
60 61
        }
    }
Donald's avatar
Donald committed
62 63 64

    flavorDimensions "default"

Donald's avatar
Donald committed
65 66
    productFlavors {
        noGPlay {
Donald's avatar
Donald committed
67
            dimension "default"
Donald's avatar
Donald committed
68
        }
Donald's avatar
Donald committed
69

Donald's avatar
Donald committed
70
        withGPlay {
Donald's avatar
Donald committed
71
            dimension "default"
Donald's avatar
Donald committed
72
        }
73
    }
Donald's avatar
Donald committed
74 75 76
}

dependencies {
Donald's avatar
Donald committed
77
    implementation fileTree(include: ['*.jar'], dir: 'libs')
Yash Thakkar's avatar
Yash Thakkar committed
78

79 80
    //exifInterface
    implementation "com.android.support:exifinterface:$supportVersion"
81

Donald's avatar
Donald committed
82
    // google & support
Donald's avatar
Donald committed
83 84 85 86 87 88 89
    implementation "com.android.support:appcompat-v7:$supportVersion"
    implementation "com.android.support:cardview-v7:$supportVersion"
    implementation "com.android.support:recyclerview-v7:$supportVersion"
    implementation "com.android.support:design:$supportVersion"
    implementation "com.android.support:palette-v7:$supportVersion"
    implementation "com.android.support:customtabs:$supportVersion"
    implementation "com.android.support:support-v4:$supportVersion"
Donald's avatar
Donald committed
90

Donald's avatar
Donald committed
91
    //exo-player
Donald's avatar
Donald committed
92 93 94 95 96
    implementation 'com.google.android.exoplayer:exoplayer-core:2.6.0'
    implementation 'com.google.android.exoplayer:exoplayer-dash:2.6.0'
    implementation 'com.google.android.exoplayer:exoplayer-ui:2.6.0'
    implementation 'com.google.android.exoplayer:exoplayer-hls:2.6.0'
    implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.6.0'
Donald's avatar
Donald committed
97 98

    // utils
Donald's avatar
Donald committed
99 100 101
    implementation 'com.github.bumptech.glide:glide:4.7.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
    implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.12'
Donald's avatar
Donald committed
102
    implementation 'com.github.Commit451:bypasses:1.1.0'
Donald's avatar
Donald committed
103 104 105
    implementation 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    implementation 'com.drewnoakes:metadata-extractor:2.11.0'
Donald's avatar
Donald committed
106
    implementation "com.orhanobut:hawk:2.0.1"
107
    implementation 'com.commonsware.cwac:provider:0.4.3'
Donald's avatar
Donald committed
108 109

    // rxJava
Donald's avatar
Donald committed
110
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
Donald's avatar
Donald committed
111
    //it is recommended to keep the same version of rxAndroid
Donald's avatar
Donald committed
112 113
    implementation 'io.reactivex.rxjava2:rxjava:2.1.13'
//    implementation 'com.jakewharton.rxrelay2:rxrelay:2.0.0'
Donald's avatar
Donald committed
114 115

    // icons
Donald's avatar
Donald committed
116 117
    implementation 'com.mikepenz:iconics-core:3.0.3@aar'
    implementation "com.mikepenz:iconics-views:3.0.3@aar"
Donald's avatar
Donald committed
118 119 120
    implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar'
    implementation 'com.mikepenz:community-material-typeface:2.0.46.1@aar'
    implementation 'com.mikepenz:fontawesome-typeface:4.7.0.2@aar'
Donald's avatar
Donald committed
121 122

    // ui
Donald's avatar
Donald committed
123 124
    implementation 'uz.shift:colorpicker:0.5@aar'
    implementation 'com.github.jetradarmobile:desertplaceholder:1.1.1'
Donald's avatar
Donald committed
125
    implementation 'de.hdodenhof:circleimageview:2.2.0'
Donald's avatar
Donald committed
126
    implementation 'com.github.yalantis:ucrop:2.2.2'
127
    implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
Yash Thakkar's avatar
Yash Thakkar committed
128
    implementation 'jp.wasabeef:recyclerview-animators:2.2.7'
129
    implementation 'com.github.HoraApps:Liz:-SNAPSHOT'
Donald's avatar
Donald committed
130 131
    implementation 'com.github.lzyzsd:circleprogress:1.2.1'

Donald's avatar
Donald committed
132

Donald's avatar
Donald committed
133 134
    // debug Only
    //debugCompile project(':inappstoragereader')
Donald's avatar
Donald committed
135
    implementation 'cat.ereza:customactivityoncrash:2.2.0'
Donald's avatar
Donald committed
136 137
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
    releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
Donald's avatar
Donald committed
138

139 140
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:multidex:1.0.3'
Donald's avatar
Donald committed
141

Donald's avatar
Donald committed
142
    // TODO check them out
Donald's avatar
Donald committed
143
    implementation 'com.turingtechnologies.materialscrollbar:lib:10.0.3'
Loris's avatar
Loris committed
144
    implementation 'de.psdev.licensesdialog:licensesdialog:1.8.3'
Donald's avatar
Donald committed
145
}
Donald's avatar
Donald committed
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164

Properties props = new Properties()
def propFile = new File('signing.properties')
if (propFile.canRead()) {
    props.load(new FileInputStream(propFile))

    if (props != null && props.containsKey('STORE_FILE') && props.containsKey('KEY_ALIAS') && props.containsKey('PASSWORD')) {
        android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
        android.signingConfigs.release.storePassword = props['PASSWORD']
        android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
        android.signingConfigs.release.keyPassword = props['PASSWORD']
    } else {
        println 'signing.properties found but some entries are missing'
        android.buildTypes.release.signingConfig = null
    }
} else {
    println 'signing.properties not found'
    android.buildTypes.release.signingConfig = null
}