Init · uofjava/AndroidPlusJava@ef4d0d4 · GitHub
Skip to content

Commit ef4d0d4

Browse files
committed
Init
0 parents  commit ef4d0d4

224 files changed

Lines changed: 12443 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 9 additions & 0 deletions

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
5+
compileSdkVersion rootProject.ext.compileSdkVersion
6+
buildToolsVersion rootProject.ext.buildToolsVersion
7+
8+
defaultConfig {
9+
applicationId "com.leon.androidplus"
10+
minSdkVersion rootProject.ext.minSdkVersion
11+
targetSdkVersion rootProject.ext.targetSdkVersion
12+
versionCode rootProject.ext.versionCode
13+
versionName rootProject.ext.versionName
14+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
15+
16+
javaCompileOptions {
17+
annotationProcessorOptions {
18+
//这里指定自动生成的文件为MyEventBusIndex
19+
arguments = [eventBusIndex: 'com.leon.androidplus.MyEventBusIndex']
20+
}
21+
}
22+
}
23+
24+
buildTypes {
25+
release {
26+
minifyEnabled true
27+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
28+
}
29+
}
30+
31+
//为了解决部分第三方库重复打包了META-INF的问题
32+
packagingOptions{
33+
exclude 'META-INF/LICENSE.txt'
34+
exclude 'META-INF/NOTICE.txt'
35+
}
36+
lintOptions {
37+
abortOnError false
38+
}
39+
40+
flavorDimensions "release"
41+
productFlavors {
42+
xiaomi {
43+
dimension "release"
44+
manifestPlaceholders = [CHANNEL_VALUE: "xiaomi"]
45+
}
46+
qh360 {
47+
dimension "release"
48+
manifestPlaceholders = [CHANNEL_VALUE: "qh360"]
49+
}
50+
baidu {
51+
dimension "release"
52+
manifestPlaceholders = [CHANNEL_VALUE: "baidu"]
53+
}
54+
wandoujia {
55+
dimension "release"
56+
manifestPlaceholders = [CHANNEL_VALUE: "wandoujia"]
57+
}
58+
tencent {
59+
dimension "release"
60+
manifestPlaceholders = [CHANNEL_VALUE: "tencent"]
61+
}
62+
}
63+
}
64+
65+
dependencies {
66+
implementation fileTree(include: ['*.jar'], dir: 'libs')
67+
//Support Library
68+
implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
69+
implementation "com.android.support:design:$supportLibraryVersion"
70+
implementation "com.android.support:cardview-v7:$supportLibraryVersion"
71+
72+
//Test Library
73+
testImplementation "junit:junit:$junitVersion"
74+
androidTestImplementation "com.android.support.test:runner:$runnerVersion"
75+
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoVersion"
76+
77+
//ButterKnife
78+
implementation "com.jakewharton:butterknife:$butterknifeVersion"
79+
annotationProcessor "com.jakewharton:butterknife-compiler:$butterknifeVersion"
80+
//Dagger
81+
implementation "com.google.dagger:dagger:$daggerVersion"
82+
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
83+
//Dagger-Android
84+
implementation "com.google.dagger:dagger-android:$daggerVersion"
85+
implementation "com.google.dagger:dagger-android-support:$daggerVersion"
86+
annotationProcessor "com.google.dagger:dagger-android-processor:$daggerVersion"
87+
// LeanCloud 基础包
88+
implementation "cn.leancloud.android:avoscloud-sdk:v$leanCloudVersion"
89+
// LeanCloud 用户反馈包
90+
implementation "cn.leancloud.android:avoscloud-feedback:v$leanCloudVersion@aar"
91+
//EventBus
92+
implementation "org.greenrobot:eventbus:$eventBusVersion"
93+
annotationProcessor "org.greenrobot:eventbus-annotation-processor:$eventBusVersion"
94+
//Glide
95+
implementation "com.github.bumptech.glide:glide:$glideVersion"
96+
annotationProcessor "com.github.bumptech.glide:compiler:$glideVersion"
97+
//腾讯Bugly
98+
implementation 'com.tencent.bugly:crashreport_upgrade:latest.release'
99+
100+
}

app/proguard-rules.pro

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in C:\Work\android-sdk/tools/proguard/proguard-android.txt
4+
# You can dialog_edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
19+
# Uncomment this to preserve the line number information for
20+
# debugging stack traces.
21+
#-keepattributes SourceFile,LineNumberTable
22+
23+
# If you keep the line number information, uncomment this to
24+
# hide the original source file name.
25+
#-renamesourcefileattribute SourceFile
26+
27+
#Bugly
28+
-dontwarn com.tencent.bugly.**
29+
-keep public class com.tencent.bugly.**{*;}
30+
-keep class android.support.**{*;}
31+
32+
#LeanCloud
33+
#https://leancloud.cn/docs/android_faq.html
34+
-keepattributes Signature
35+
-dontwarn com.jcraft.jzlib.**
36+
-keep class com.jcraft.jzlib.** { *;}
37+
38+
-dontwarn sun.misc.**
39+
-keep class sun.misc.** { *;}
40+
41+
-dontwarn com.alibaba.fastjson.**
42+
-keep class com.alibaba.fastjson.** { *;}
43+
44+
-dontwarn sun.security.**
45+
-keep class sun.security.** { *; }
46+
47+
-dontwarn com.google.**
48+
-keep class com.google.** { *;}
49+
50+
-dontwarn com.avos.**
51+
-keep class com.avos.** { *;}
52+
53+
-keep public class android.net.http.SslError
54+
-keep public class android.webkit.WebViewClient
55+
56+
-dontwarn android.webkit.WebView
57+
-dontwarn android.net.http.SslError
58+
-dontwarn android.webkit.WebViewClient
59+
60+
-dontwarn android.support.**
61+
62+
-dontwarn org.apache.**
63+
-keep class org.apache.** { *;}
64+
65+
-dontwarn org.jivesoftware.smack.**
66+
-keep class org.jivesoftware.smack.** { *;}
67+
68+
-dontwarn com.loopj.**
69+
-keep class com.loopj.** { *;}
70+
71+
-dontwarn com.squareup.okhttp.**
72+
-keep class com.squareup.okhttp.** { *;}
73+
-keep interface com.squareup.okhttp.** { *; }
74+
75+
-dontwarn okio.**
76+
77+
-dontwarn org.xbill.**
78+
-keep class org.xbill.** { *;}
79+
80+
-keepattributes *Annotation*
81+
82+
83+
#EventBus
84+
#http://greenrobot.org/eventbus/documentation/proguard/
85+
-keepattributes *Annotation*
86+
-keepclassmembers class ** {
87+
@org.greenrobot.eventbus.Subscribe <methods>;
88+
}
89+
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
90+
# Only required if you use AsyncExecutor
91+
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
92+
<init>(java.lang.Throwable);
93+
}
94+
95+
96+
# Dagger
97+
# https://github.com/square/dagger
98+
-dontwarn dagger.internal.codegen.**
99+
-keepclassmembers,allowobfuscation class * {
100+
@javax.inject.* *;
101+
@dagger.* *;
102+
<init>();
103+
}
104+
-keep class dagger.* { *; }
105+
-keep class javax.inject.* { *; }
106+
-keep class * extends dagger.internal.Binding
107+
-keep class * extends dagger.internal.ModuleAdapter
108+
-keep class * extends dagger.internal.StaticInjectionn
109+
110+
#ButterKnife
111+
#https://github.com/JakeWharton/butterknife/blob/master/butterknife/proguard-rules.txt
112+
# Retain generated class which implement Unbinder.
113+
-keep public class * implements butterknife.Unbinder { public <init>(**, android.view.View); }
114+
# Prevent obfuscation of types which use ButterKnife annotations since the simple name
115+
# is used to reflectively look up the generated ViewBinding.
116+
-keep class butterknife.*
117+
-keepclasseswithmembernames class * { @butterknife.* <methods>; }
118+
-keepclasseswithmembernames class * { @butterknife.* <fields>; }
119+
120+
#Glide
121+
-keep public class * implements com.bumptech.glide.module.GlideModule
122+
-keep public class * extends com.bumptech.glide.module.AppGlideModule
123+
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
124+
**[] $VALUES;
125+
public *;
126+
}
Lines changed: 26 additions & 0 deletions

0 commit comments

Comments
 (0)