forked from REBOOTERS/AndroidAnimationExercise
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
179 lines (158 loc) · 5.64 KB
/
build.gradle
File metadata and controls
179 lines (158 loc) · 5.64 KB
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
168
169
170
171
172
173
174
175
176
177
178
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: "com.dorongold.task-tree"
def ext = rootProject.ext
android {
signingConfigs {
debug {
keyAlias 'animation'
keyPassword '123456'
storeFile file("$rootDir/animationkey")
storePassword '123456'
}
}
compileSdkVersion ext.compileSdkVersion
defaultConfig {
applicationId "home.smart.fly.animations"
minSdkVersion ext.minSdkVersion
targetSdkVersion ext.targetSdkVersion
versionCode 4
versionName "4.0"
flavorDimensions "versionCode"
//blur
renderscriptTargetApi 19
renderscriptSupportModeEnabled true
//
vectorDrawables.useSupportLibrary true
//65536
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
arguments = [moduleName: project.getName()]
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// just for study ,without real meaning
flavorDimensions "default"
productFlavors {
free {
versionNameSuffix "-free"
}
charge {
versionNameSuffix "-charge"
}
}
// android.applicationVariants.all { variant ->
// println("variant===${variant.name} ${variant.versionName}\n")
// variant.outputs.all {
// outputFileName = "animation-${defaultConfig.versionName}-${releaseTime()}-${variant.name}.apk"
// }
// }
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'com.google.code.gson:gson:2.8.2'
implementation "androidx.appcompat:appcompat:$ext.support_versioin"
implementation "com.google.android.material:material:$ext.support_versioin"
implementation 'com.orhanobut:logger:2.1.1'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation "androidx.legacy:legacy-support-v4:$ext.support_versioin"
implementation "androidx.cardview:cardview:$ext.support_versioin"
implementation "com.github.bumptech.glide:glide:$ext.glide"
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okio:okio:1.14.1'
implementation 'androidx.multidex:multidex:2.0.0'
implementation "androidx.vectordrawable:vectordrawable:$ext.support_versioin"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'cn.bingoogolapple:bga-refreshlayout:1.1.8@aar'
implementation 'cn.bingoogolapple:bga-banner:2.2.4@aar'
implementation 'cn.bingoogolapple:bga-adapter:1.1.8@aar'
// implementation 'com.jakewharton:butterknife:8.8.1'
// kapt 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.jakewharton:butterknife:10.0.0'
kapt "com.jakewharton:butterknife-compiler:10.0.0"
testImplementation 'junit:junit:4.12'
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.dynamicanimation:dynamicanimation:$support_versioin"
implementation 'com.airbnb.android:lottie:2.5.1'
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
debugImplementation "com.squareup.leakcanary:leakcanary-android:$ext.leakcanary"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$ext.leakcanary"
debugImplementation "com.squareup.leakcanary:leakcanary-support-fragment:$ext.leakcanary"
if (!imitate_isApp.toBoolean()) {
implementation project(':imitate')
}
implementation 'net.sourceforge.streamsupport:streamsupport:1.6.3'
implementation "com.alibaba:arouter-api:$ext.arouter_api"
kapt "com.alibaba:arouter-compiler:$ext.arouter_compiler"
testImplementation 'org.robolectric:robolectric:4.1'
kapt 'com.zhihu.android:sugaradapter-processor:1.8.6'
implementation "androidx.palette:palette:$support_versioin"
implementation 'jp.wasabeef:takt:2.0.0'
}
ext.allDependencies.each {
dependencies.add('implementation', it)
}
repositories {
mavenCentral()
}
static def releaseTime() {
return new Date().format("yyyy-MM-dd HH:mm", TimeZone.getTimeZone("GMT+08:00"))
}
def getGitCommit() {
def stdout = new ByteArrayOutputStream()
exec {
commandLine "git"
args "rev-parse", "--short", "HEAD"
standardOutput = stdout
}
return stdout.toString().trim()
}
def getGitBranch() {
def stdout = new ByteArrayOutputStream()
exec {
commandLine "git"
args "rev-parse", "--abbrev-ref", "HEAD"
standardOutput = stdout
}
return stdout.toString().trim()
}
// just for study 修改 app 的输出目录到 destDir 指定目录
//apply plugin: ApkDistPlugin
//
//apkconfig {
// println "apk dist into: " + rootDir.toString() + File.separator + apkDir
// println "git commit info: " + getGitCommit()
// println "git branch info: " + getGitBranch()
//
// nameMap { name ->
// println '应用名称:' + name
// return name
// }
// destDir apkDir
//}