forked from TWiStErRob/glide-support
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
167 lines (145 loc) · 5.74 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
}
}
apply plugin: 'com.android.application'
repositories {
jcenter()
google()
// https://github.com/bumptech/glide/wiki/Snapshots#building-snapshots-locally
if (project.hasProperty('local.repo')) {
maven {name = 'glide-local'; url = project.property('local.repo')}
}
// https://github.com/bumptech/glide/wiki/Snapshots#obtaining-snapshots
maven {name = 'glide-snapshot'; url = 'http://oss.sonatype.org/content/repositories/snapshots'}
flatDir name: 'libs', dirs: 'libs'
}
android {
compileSdkVersion 28
buildToolsVersion "29.0.3"
defaultConfig {
minSdkVersion 14
//noinspection OldTargetApi holding back for when AndroidX is migrated
targetSdkVersion 28
versionCode = 1
versionName = "0.1"
vectorDrawables.useSupportLibrary = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
sourceSets.main.java.srcDir 'src/main/thirdparty'
productFlavors {
glide3 {
flavorDimensions 'default'
applicationId = "com.bumptech.glide.supportapp.v3"
sourceSets.glide3.java.srcDir 'src/glide3/thirdparty'
sourceSets.glide3.java.srcDir 'src/glide3/hacks'
}
glide4 {
flavorDimensions 'default'
applicationId = "com.bumptech.glide.supportapp.v4"
sourceSets.glide4.java.srcDir 'src/glide4/thirdparty'
sourceSets.glide4.java.srcDir 'src/glide4/hacks'
}
}
variantFilter {variant ->
if (variant.buildType.name == buildTypes.release.name) {
variant.ignore = true
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
}
lintOptions {
checkAllWarnings = true
abortOnError = false
}
}
dependencies {
// Immediate SNAPSHOT resolution (in case the built version is too new), default is a day
//configurations.glide4Implementation.resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
implementation fileTree(dir: 'libs', include: [ '*.jar' ])
//implementation(name: 'somefile_name', ext: 'aar')
def supportVersion = '28.0.0'
// Basic Android dependencies
implementation "com.android.support:support-annotations:${supportVersion}"
implementation "com.android.support:support-v4:${supportVersion}"
implementation "com.android.support:appcompat-v7:${supportVersion}"
// Extra dependencies for individual issues
implementation "com.android.support:cardview-v7:${supportVersion}"
implementation "com.android.support:recyclerview-v7:${supportVersion}"
implementation "com.android.support:palette-v7:${supportVersion}"
implementation "com.android.support:percent:${supportVersion}"
implementation "com.android.support:design:${supportVersion}"
implementation "com.android.support:exifinterface:${supportVersion}"
implementation 'jp.wasabeef:glide-transformations:2.0.2'
implementation 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'
implementation 'com.firebase:firebase-client-android:2.5.2'
implementation 'com.facebook.stetho:stetho:1.5.1'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.1'
implementation 'com.facebook.stetho:stetho-urlconnection:1.5.1'
}
dependencies { // Glide v4 (last non-AndroidX release)
def glideVersion = '4.9.0'
//noinspection GradleDependency latest v3, no need to upgrade to v4
glide4Implementation "com.github.bumptech.glide:glide:${glideVersion}"
glide4Implementation "com.github.bumptech.glide:annotations:${glideVersion}"
glide4AnnotationProcessor "com.github.bumptech.glide:compiler:${glideVersion}"
glide4Implementation "com.github.bumptech.glide:recyclerview-integration:${glideVersion}@aar"
// APT for code navigation (DO NOT USE in production, not even for testing)
testGlide4CompileOnly "com.github.bumptech.glide:compiler:${glideVersion}"
// OkHttp
glide4Implementation "com.github.bumptech.glide:okhttp3-integration:${glideVersion}"
glide4Implementation 'com.squareup.okhttp3:okhttp:4.4.0'
glide4Implementation 'com.squareup.okhttp3:logging-interceptor:4.4.0'
// Volley
glide4Implementation "com.github.bumptech.glide:volley-integration:${glideVersion}"
glide4Implementation 'com.android.volley:volley:1.1.0'
}
dependencies { // Glide v3
def glideVersion = '3.9.0-SNAPSHOT'
def glideIntegrationVersion = '1.6.0-SNAPSHOT'
//noinspection GradleDependency latest v3, no need to upgrade to v4
glide3Implementation "com.github.bumptech.glide:glide:${glideVersion}"
// OkHttp
//noinspection GradleDependency latest v3, no need to upgrade to v4
glide3Implementation "com.github.bumptech.glide:okhttp-integration:${glideIntegrationVersion}"
glide3Implementation 'com.squareup.okhttp:okhttp:2.7.5'
// OkHttp3
//noinspection GradleDependency latest v3, no need to upgrade to v4
glide3Implementation "com.github.bumptech.glide:okhttp3-integration:${glideIntegrationVersion}"
glide3Implementation 'com.squareup.okhttp3:okhttp:4.4.0'
glide3Implementation 'com.squareup.okhttp3:logging-interceptor:4.4.0'
// Volley
//noinspection GradleDependency latest v3, no need to upgrade to v4
glide3Implementation "com.github.bumptech.glide:volley-integration:${glideIntegrationVersion}"
glide3Implementation 'com.mcxiaoke.volley:library:1.0.19'
}
dependencies { // Competition
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
//implementation 'com.facebook.fresco:fresco:0.9.0' // not used yet, it has too many dependencies
}
project.afterEvaluate {
tasks.withType(JavaCompile) {
options.compilerArgs += [
"-Werror",
"-Xlint:unchecked",
"-Xlint:rawtypes",
"-Xlint:varargs",
"-Xlint:-deprecation"
]
}
}