Skip to content

Commit 2dd5c21

Browse files
committed
Initial commit
0 parents  commit 2dd5c21

File tree

141 files changed

+7290
-0
lines changed

Some content is hidden

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

141 files changed

+7290
-0
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches/build_file_checksums.ser
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
.DS_Store
9+
/build
10+
/captures
11+
.externalNativeBuild

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: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 27
5+
defaultConfig {
6+
applicationId "moe.div.moeplayer"
7+
minSdkVersion 21
8+
targetSdkVersion 27
9+
versionCode 6
10+
versionName "1.2.0"
11+
}
12+
compileOptions {
13+
sourceCompatibility JavaVersion.VERSION_1_8
14+
targetCompatibility JavaVersion.VERSION_1_8
15+
}
16+
buildTypes {
17+
release {
18+
minifyEnabled true
19+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20+
}
21+
}
22+
23+
}
24+
25+
dependencies {
26+
implementation fileTree(dir: 'libs', include: ['*.jar'])
27+
implementation 'com.android.support:appcompat-v7:27.1.1'
28+
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
29+
api 'com.android.support:cardview-v7:27.1.1'
30+
// 基类库
31+
api project(path: ':mobase')
32+
// 网络请求
33+
api 'com.squareup.okhttp3:okhttp:3.10.0'
34+
// Json解析
35+
api 'com.google.code.gson:gson:2.8.2'
36+
// 图片加载
37+
api 'com.github.bumptech.glide:glide:3.7.0'
38+
// 事件总线
39+
api 'org.greenrobot:eventbus:3.1.1'
40+
// RxJava
41+
implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
42+
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
43+
// GSY播放器
44+
implementation 'com.shuyu:gsyVideoPlayer-java:6.0.2'
45+
// 是否需要ExoPlayer模式
46+
implementation 'com.shuyu:GSYVideoPlayer-exo2:6.0.2'
47+
// 更多ijk的编码支持
48+
implementation 'com.shuyu:gsyVideoPlayer-ex_so:6.0.2'
49+
// 运行时权限
50+
implementation 'com.github.tbruyelle:rxpermissions:0.10.2'
51+
// 下拉刷新
52+
implementation 'cn.bingoogolapple:bga-refreshlayout:1.1.7@aar'
53+
}

app/proguard-baidu-mtj.pro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
-keep class com.baidu.mobstat.** { *; }

app/proguard-rules.pro

Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
22+
#
23+
#-------------------------------------------基本不用动区域----------------------------------------------
24+
#
25+
#
26+
# -----------------------------基本 -----------------------------
27+
#
28+
29+
# 指定代码的压缩级别 0 - 7(指定代码进行迭代优化的次数,在Android里面默认是5,这条指令也只有在可以优化时起作用。)
30+
-optimizationpasses 5
31+
# 混淆时不会产生形形色色的类名(混淆时不使用大小写混合类名)
32+
-dontusemixedcaseclassnames
33+
# 指定不去忽略非公共的库类(不跳过library中的非public的类)
34+
-dontskipnonpubliclibraryclasses
35+
# 指定不去忽略包可见的库类的成员
36+
-dontskipnonpubliclibraryclassmembers
37+
#不进行优化,建议使用此选项,
38+
-dontoptimize
39+
# 不进行预校验,Android不需要,可加快混淆速度。
40+
-dontpreverify
41+
# 屏蔽警告
42+
-ignorewarnings
43+
# 指定混淆是采用的算法,后面的参数是一个过滤器
44+
# 这个过滤器是谷歌推荐的算法,一般不做更改
45+
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
46+
# 保护代码中的Annotation不被混淆
47+
-keepattributes *Annotation*
48+
# 避免混淆泛型, 这在JSON实体映射时非常重要
49+
-keepattributes Signature
50+
# 抛出异常时保留代码行号
51+
-keepattributes SourceFile,LineNumberTable
52+
#优化时允许访问并修改有修饰符的类和类的成员,这可以提高优化步骤的结果。
53+
# 比如,当内联一个公共的getter方法时,这也可能需要外地公共访问。
54+
# 虽然java二进制规范不需要这个,要不然有的虚拟机处理这些代码会有问题。当有优化和使用-repackageclasses时才适用。
55+
#指示语:不能用这个指令处理库中的代码,因为有的类和类成员没有设计成public ,而在api中可能变成public
56+
-allowaccessmodification
57+
#当有优化和使用-repackageclasses时才适用。
58+
-repackageclasses ''
59+
# 混淆时记录日志(打印混淆的详细信息)
60+
# 这句话能够使我们的项目混淆后产生映射文件
61+
# 包含有类名->混淆后类名的映射关系
62+
-verbose
63+
64+
#
65+
# ----------------------------- 默认保留 -----------------------------
66+
#
67+
#----------------------------------------------------
68+
# 保持哪些类不被混淆
69+
#继承activity,application,service,broadcastReceiver,contentprovider....不进行混淆
70+
-keep public class * extends android.app.Activity
71+
-keep public class * extends android.app.Application
72+
-keep public class * extends android.support.multidex.MultiDexApplication
73+
-keep public class * extends android.app.Service
74+
-keep public class * extends android.content.BroadcastReceiver
75+
-keep public class * extends android.content.ContentProvider
76+
-keep public class * extends android.app.backup.BackupAgentHelper
77+
-keep public class * extends android.preference.Preference
78+
-keep public class * extends android.view.View
79+
-keep class android.support.** {*;}## 保留support下的所有类及其内部类
80+
81+
-keep public class com.google.vending.licensing.ILicensingService
82+
-keep public class com.android.vending.licensing.ILicensingService
83+
#表示不混淆上面声明的类,最后这两个类我们基本也用不上,是接入Google原生的一些服务时使用的。
84+
#----------------------------------------------------
85+
86+
# 保留继承的
87+
-keep public class * extends android.support.v4.**
88+
-keep public class * extends android.support.v7.**
89+
-keep public class * extends android.support.annotation.**
90+
91+
92+
#表示不混淆任何包含native方法的类的类名以及native方法名,这个和我们刚才验证的结果是一致
93+
-keepclasseswithmembernames class * {
94+
native <methods>;
95+
}
96+
97+
98+
#这个主要是在layout 中写的onclick方法android:onclick="onClick",不进行混淆
99+
#表示不混淆Activity中参数是View的方法,因为有这样一种用法,在XML中配置android:onClick=”buttonClick”属性,
100+
#当用户点击该按钮时就会调用Activity中的buttonClick(View view)方法,如果这个方法被混淆的话就找不到了
101+
-keepclassmembers class * extends android.app.Activity{
102+
public void *(android.view.View);
103+
}
104+
105+
#表示不混淆枚举中的values()和valueOf()方法,枚举我用的非常少,这个就不评论了
106+
-keepclassmembers enum * {
107+
public static **[] values();
108+
public static ** valueOf(java.lang.String);
109+
}
110+
111+
#表示不混淆任何一个View中的setXxx()和getXxx()方法,
112+
#因为属性动画需要有相应的setter和getter的方法实现,混淆了就无法工作了。
113+
-keep public class * extends android.view.View{
114+
*** get*();
115+
void set*(***);
116+
public <init>(android.content.Context);
117+
public <init>(android.content.Context, android.util.AttributeSet);
118+
public <init>(android.content.Context, android.util.AttributeSet, int);
119+
}
120+
-keepclasseswithmembers class * {
121+
public <init>(android.content.Context, android.util.AttributeSet);
122+
public <init>(android.content.Context, android.util.AttributeSet, int);
123+
}
124+
125+
#表示不混淆Parcelable实现类中的CREATOR字段,
126+
#毫无疑问,CREATOR字段是绝对不能改变的,包括大小写都不能变,不然整个Parcelable工作机制都会失败。
127+
-keep class * implements android.os.Parcelable {
128+
public static final android.os.Parcelable$Creator *;
129+
}
130+
# 这指定了继承Serizalizable的类的如下成员不被移除混淆
131+
-keepclassmembers class * implements java.io.Serializable {
132+
static final long serialVersionUID;
133+
private static final java.io.ObjectStreamField[] serialPersistentFields;
134+
private void writeObject(java.io.ObjectOutputStream);
135+
private void readObject(java.io.ObjectInputStream);
136+
java.lang.Object writeReplace();
137+
java.lang.Object readResolve();
138+
}
139+
# 保留R下面的资源
140+
#-keep class **.R$* {
141+
# *;
142+
#}
143+
#不混淆资源类下static的
144+
-keepclassmembers class **.R$* {
145+
public static <fields>;
146+
}
147+
148+
# 对于带有回调函数的onXXEvent、**On*Listener的,不能被混淆
149+
-keepclassmembers class * {
150+
void *(**On*Event);
151+
void *(**On*Listener);
152+
}
153+
154+
# 保留我们自定义控件(继承自View)不被混淆
155+
-keep public class * extends android.view.View{
156+
*** get*();
157+
void set*(***);
158+
public <init>(android.content.Context);
159+
public <init>(android.content.Context, android.util.AttributeSet);
160+
public <init>(android.content.Context, android.util.AttributeSet, int);
161+
}
162+
163+
#
164+
#----------------------------- WebView(项目中没有可以忽略) -----------------------------
165+
#
166+
#webView需要进行特殊处理
167+
-keepclassmembers class fqcn.of.javascript.interface.for.Webview {
168+
public *;
169+
}
170+
-keepclassmembers class * extends android.webkit.WebViewClient {
171+
public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
172+
public boolean *(android.webkit.WebView, java.lang.String);
173+
}
174+
-keepclassmembers class * extends android.webkit.WebViewClient {
175+
public void *(android.webkit.WebView, jav.lang.String);
176+
}
177+
#在app中与HTML5的JavaScript的交互进行特殊处理
178+
#我们需要确保这些js要调用的原生方法不能够被混淆,于是我们需要做如下处理:
179+
-keepclassmembers class com.ljd.example.JSInterface {
180+
<methods>;
181+
}
182+
183+
#
184+
#---------------------------------实体类---------------------------------
185+
#--------(实体Model不能混淆,否则找不到对应的属性获取不到值)-----
186+
#
187+
-dontwarn com.suchengkeji.android.confusiondemo.md.**
188+
#对含有反射类的处理
189+
-keep class com.suchengkeji.android.confusiondemo.md.** { *; }
190+
#
191+
# ----------------------------- 其他的 -----------------------------
192+
#
193+
# 删除代码中Log相关的代码
194+
-assumenosideeffects class android.util.Log {
195+
public static boolean isLoggable(java.lang.String, int);
196+
public static int v(...);
197+
public static int i(...);
198+
public static int w(...);
199+
public static int d(...);
200+
public static int e(...);
201+
}
202+
203+
# 保持测试相关的代码
204+
-dontnote junit.framework.**
205+
-dontnote junit.runner.**
206+
-dontwarn android.test.**
207+
-dontwarn android.support.test.**
208+
-dontwarn org.junit.**
209+
210+
211+
#
212+
# ----------------------------- 第三方 -----------------------------
213+
#
214+
-dontwarn com.orhanobut.logger.**
215+
-keep class com.orhanobut.logger.**{*;}
216+
-keep interface com.orhanobut.logger.**{*;}
217+
218+
-dontwarn com.google.gson.**
219+
-keep class com.google.gson.**{*;}
220+
-keep interface com.google.gson.**{*;}
221+
222+
#
223+
# ----------------------------- glide -----------------------------
224+
#
225+
-keep public class * implements com.bumptech.glide.module.GlideModule
226+
-keep public class * extends com.bumptech.glide.module.AppGlideModule
227+
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
228+
**[] $VALUES;
229+
public *;
230+
}
231+
232+
#
233+
# ----------------------------- gsyvideoplayer -----------------------------
234+
#
235+
-keep class com.shuyu.gsyvideoplayer.video.** { *; }
236+
-dontwarn com.shuyu.gsyvideoplayer.video.**
237+
-keep class com.shuyu.gsyvideoplayer.video.base.** { *; }
238+
-dontwarn com.shuyu.gsyvideoplayer.video.base.**
239+
-keep class com.shuyu.gsyvideoplayer.utils.** { *; }
240+
-dontwarn com.shuyu.gsyvideoplayer.utils.**
241+
-keep class tv.danmaku.ijk.** { *; }
242+
-dontwarn tv.danmaku.ijk.**
243+
244+
-keep public class * extends android.view.View{
245+
*** get*();
246+
void set*(***);
247+
public <init>(android.content.Context);
248+
public <init>(android.content.Context, android.util.AttributeSet);
249+
public <init>(android.content.Context, android.util.AttributeSet, int);
250+
}
251+
#
252+
# ----------------------------- EventBus 3.0 -----------------------------
253+
#
254+
-keepattributes *Annotation*
255+
-keepclassmembers class * {
256+
@org.greenrobot.eventbus.Subscribe <methods>;
257+
}
258+
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
259+
260+
# And if you use AsyncExecutor:
261+
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
262+
<init>(java.lang.Throwable);
263+
}

app/release/output.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":6,"versionName":"1.2.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

0 commit comments

Comments
 (0)