-
Notifications
You must be signed in to change notification settings - Fork 414
/
build.gradle
173 lines (142 loc) · 7.06 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
168
169
170
171
172
173
apply plugin: 'com.android.application'
apply plugin: 'com.novoda.build-properties'
buildProperties {
getPublic {
file rootProject.file('public.properties')
}
getLocal {
file rootProject.file('local.properties')
}
}
android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
defaultConfig {
applicationId "com.thirtydegreesray.openhub"
minSdkVersion MIN_SDK_VERSION as int
targetSdkVersion TARGET_SDK_VERSION as int
versionCode VERSION_CODE as int
versionName VERSION_NAME
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled false
buildConfigField "String", "OPENHUB_CLIENT_ID", (buildProperties.getLocal['openhub_client_id'] | buildProperties.getPublic['openhub_client_id']).string
buildConfigField "String", "OPENHUB_CLIENT_SECRET", (buildProperties.getLocal['openhub_client_secret'] | buildProperties.getPublic['openhub_client_secret']).string
buildConfigField "String", "BUGLY_ID", (buildProperties.getLocal['bugly_appid'] | buildProperties.getPublic['bugly_appid']).string
buildConfigField "String", "DEBUG_BUGLY_ID", (buildProperties.getLocal['debug_bugly_appid'] | buildProperties.getPublic['debug_bugly_appid']).string
ndk {
// abiFilters 'armeabi', 'armeabi-v7a', 'x86'
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
signingConfigs {
release {
storeFile(file((buildProperties.getLocal['sign_path'] | buildProperties.getPublic['sign_path']).string))
storePassword((buildProperties.getLocal['store_password'] | buildProperties.getPublic['store_password']).string)
keyAlias((buildProperties.getLocal['key_alias'] | buildProperties.getPublic['key_alias']).string)
keyPassword((buildProperties.getLocal['key_password'] | buildProperties.getPublic['key_password']).string)
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
signingConfig signingConfigs.release
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
checkReleaseBuilds true
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
flavorDimensions "default"
productFlavors {
normal {
dimension "default"
// add app_name int string.xml
resValue "string", "app_name", "OpenHub"
}
fullName {
dimension "default"
// add app_name int string.xml
resValue "string", "app_name", "OpenHub for GitHub"
}
}
productFlavors.all {
flavor -> flavor.manifestPlaceholders = [BUGLY_APP_CHANNEL_VALUE: name]
}
}
repositories {
maven { url "https://jitpack.io" }
google()
flatDir {
dirs 'libs' //aar
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'
// compile "com.android.support:support-annotations:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support:support-v4:${ANDROID_SUPPORT_VERSION}"
// compile "com.android.support:support-v13:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support:appcompat-v7:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support:recyclerview-v7:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support:design:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support:cardview-v7:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support:support-vector-drawable:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support:preference-v7:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support:preference-v14:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support:customtabs:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support.constraint:constraint-layout:${CONSTRAINT_VERSION}"
// compile "com.android.support:multidex:${MULTIDEX_VERSION}"
implementation "com.thirtydegreesray:dataautoaccess:${DATAAUTOACCESS_VERSION}"
annotationProcessor "com.thirtydegreesray:dataautoaccess-compiler:${DATAAUTOACCESS_VERSION}"
implementation "com.jakewharton:butterknife:${BUTTERKNIFE_VERSION}"
annotationProcessor "com.jakewharton:butterknife-compiler:${BUTTERKNIFE_VERSION}"
//数据库工具
implementation "org.greenrobot:greendao:${GREEN_DAO_VERSION}"
//事件总线
implementation "org.greenrobot:eventbus:${EVENT_BUS_VERSION}"
//文件下载
//RxJava
implementation "io.reactivex:rxjava:${RXJAVA_VERSION}"
implementation "io.reactivex:rxandroid:${RXJAVA_VERSION}"
//Type-safe HTTP client for Android and Java by Square, Inc.
implementation "com.squareup.retrofit2:retrofit:${RETROFIT_VERSION}"
implementation "com.squareup.retrofit2:converter-gson:${RETROFIT_VERSION}"
implementation "com.squareup.retrofit2:adapter-rxjava:${RETROFIT_VERSION}"
implementation ("com.squareup.retrofit2:converter-simplexml:${RETROFIT_VERSION}"){
exclude group: 'xpp3', module: 'xpp3'
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
}
//dagger依赖注入
implementation "com.google.dagger:dagger:${DAGGER_VERSION}"
annotationProcessor "com.google.dagger:dagger-compiler:${DAGGER_VERSION}"
implementation "com.tbruyelle.rxpermissions:rxpermissions:${RX_PERMISSION_VERSION}"
implementation "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
annotationProcessor "com.github.bumptech.glide:compiler:${GLIDE_VERSION}"
// compile "com.makeramen:roundedimageview:${ROUNDED_IMAGEVIEW_VERSION}"
implementation "de.hdodenhof:circleimageview:${CIRCLE_IMAGEVIEW_VERSION}"
implementation "com.github.GrenderG:Toasty:${TOASTY_VERSION}"
implementation "com.github.daniel-stoneuk:material-about-library:${MATERIAL_ABOUT_VERSION}"
implementation "com.unstoppable:submitbutton:${SUBMIT_BUTTON_VERSION}"
implementation "com.afollestad.material-dialogs:core:${MATERIAL_DIALOG_VERSION}"
implementation "com.afollestad.material-dialogs:commons:${MATERIAL_DIALOG_VERSION}"
implementation "com.zzhoujay.richtext:richtext:${RICKTEXT_VERSION}"
implementation 'com.zzhoujay.glideimagegetter:glideimagegetter:1.0.5'
implementation "com.orhanobut:logger:${LOGGER_VERSION}"
implementation "com.timehop.stickyheadersrecyclerview:library:${STICKY_HEAD_VERSION}"
implementation "org.jsoup:jsoup:${JSOUP_VERSION}"
}