Skip to content

Commit f6d0690

Browse files
author
videopls
committed
1.开发者app兼容最新的Vid 2.修改开发者app架构 mvc --> mvpeoOS SDK
1 parent 7cae785 commit f6d0690

32 files changed

+992
-562
lines changed

VideoOS/videoos_dev_app/build.gradle

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
11
apply plugin: 'com.android.application'
22

3-
def keystoreFilepath = ''
4-
def keystorePSW = ''
5-
def keystoreAlias = ''
6-
def keystoreAliasPSW = ''
7-
8-
Properties properties = new Properties()
9-
properties.load(project.rootProject.file('key.properties').newDataInputStream())
10-
keystoreFilepath = properties.getProperty("keystore.path")
11-
12-
if (keystoreFilepath) {
13-
keystorePSW = properties.getProperty("keystore.password")
14-
keystoreAlias = properties.getProperty("keystore.alias")
15-
keystoreAliasPSW = properties.getProperty("keystore.alias_password")
16-
} else {
17-
keystoreFilepath = "${System.properties['user.home']}/.android/debug.keystore"
18-
println("No release keystore found. Using default at [$keystoreFilepath]")
19-
keystorePSW = 'android'
20-
keystoreAlias = 'androiddebugkey'
21-
keystoreAliasPSW = 'android'
22-
}
23-
24-
253
configurations.all {
264
resolutionStrategy.force 'com.android.support:support-annotations:28.0.0'
275
}
@@ -32,7 +10,7 @@ android {
3210
defaultConfig {
3311
applicationId "both.video.venvy.com.appdemodev"
3412
minSdkVersion 19
35-
targetSdkVersion 28
13+
targetSdkVersion 21
3614
versionCode 1
3715
versionName "1.0.0"
3816
javaCompileOptions {
@@ -46,28 +24,23 @@ android {
4624
targetCompatibility JavaVersion.VERSION_1_7
4725
}
4826
}
49-
50-
signingConfigs {
51-
release {
52-
storeFile file(keystoreFilepath)
53-
storePassword keystorePSW
54-
keyAlias keystoreAlias
55-
keyPassword keystoreAliasPSW
56-
}
57-
}
58-
59-
6027
buildTypes {
6128
debug {
6229
minifyEnabled false
6330
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
6431
}
6532
release {
33+
//是否混淆
34+
minifyEnabled true
35+
shrinkResources true
36+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
37+
}
38+
39+
preRelease {
40+
//是否混淆
6641
minifyEnabled true
67-
zipAlignEnabled true
6842
shrinkResources true
6943
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
70-
signingConfig signingConfigs.release
7144
}
7245
}
7346

@@ -107,6 +80,7 @@ dependencies {
10780
compile 'com.squareup.okhttp3:okhttp:3.4.1'
10881
compile 'com.squareup.okio:okio:1.12.0'
10982
compile 'com.just.agentweb:agentweb:4.1.2'
83+
compile 'com.alibaba:fastjson:1.1.70.android'
11084
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'
11185
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.6.2'
11286
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'

VideoOS/videoos_dev_app/proguard-rules.pro

Lines changed: 4 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -24,166 +24,16 @@
2424
# hide the original source file name.
2525
#-renamesourcefileattribute SourceFile
2626

27-
-optimizationpasses 5
28-
29-
# 混合时不使用大小写混合,混合后的类名为小写
30-
-dontusemixedcaseclassnames
31-
32-
# 指定不去忽略非公共库的类
33-
-dontskipnonpubliclibraryclasses
34-
35-
# 不做预校验,preverify是proguard的四个步骤之一,Android不需要preverify,去掉这一步能够加快混淆速度。
36-
-dontpreverify
37-
38-
# 保留Annotation不混淆
39-
-keepattributes *Annotation*,Exceptions
40-
#javascriript与webview交互
41-
-keepattributes *JavascriptInterface*
42-
43-
# 避免混淆泛型
44-
-keepattributes Signature
45-
46-
#-keepattributes InnerClasses
47-
48-
# 抛出异常时保留代码行号
49-
-keepattributes SourceFile,LineNumberTable
50-
51-
-keepattributes EnclosingMethod
52-
53-
# 指定混淆是采用的算法,后面的参数是一个过滤器
54-
# 这个过滤器是谷歌推荐的算法,一般不做更改
55-
-optimizations !code/simplification/cast,!field/*,!class/merging/*
56-
57-
# 保留我们使用的四大组件,自定义的Application等等这些类不被混淆
58-
# 因为这些子类都有可能被外部调用
59-
-keep public class * extends android.support.v7.app.AppCompatActivity
60-
-keep public class * extends android.app.Application
61-
-keep public class * extends android.app.Service
62-
-keep public class * extends android.app.Fragment
63-
-keep public class * extends android.support.v4.app.Fragment
64-
-keep public class * extends android.content.BroadcastReceiver
65-
-keep public class * extends android.content.ContentProvider
66-
-keep public class * extends android.app.backup.BackupAgentHelper
67-
-keep public class * extends android.preference.Preference
68-
-keep public class * extends android.view.View
69-
-keep public class com.android.vending.licensing.ILicensingService
70-
71-
# 保留support下的所有类及其内部类
72-
-keep class android.support.** {*;}
73-
74-
# 保留继承的
75-
-keep public class * extends android.support.v4.**
76-
-keep public class * extends android.support.v7.**
77-
-keep public class * extends android.support.annotation.**
78-
79-
# 保留枚举类不被混淆
80-
-keepclassmembers enum * {
81-
public static **[] values();
82-
public static ** valueOf(java.lang.String);
83-
}
84-
85-
# 保留我们自定义控件(继承自View)不被混淆
86-
-keep public class * extends android.view.View{
87-
*** get*();
88-
void set*(***);
89-
public <init>(android.content.Context);
90-
public <init>(android.content.Context, android.util.AttributeSet);
91-
public <init>(android.content.Context, android.util.AttributeSet, int);
92-
}
93-
94-
# 保留Parcelable序列化类不被混淆
95-
-keep class * implements android.os.Parcelable {
96-
public static final android.os.Parcelable$Creator *;
97-
}
98-
99-
# 保留Serializable序列化的类不被混淆
100-
-keepclassmembers class * implements java.io.Serializable {
101-
static final long serialVersionUID;
102-
private static final java.io.ObjectStreamField[] serialPersistentFields;
103-
!static !transient <fields>;
104-
!private <fields>;
105-
!private <methods>;
106-
private void writeObject(java.io.ObjectOutputStream);
107-
private void readObject(java.io.ObjectInputStream);
108-
java.lang.Object writeReplace();
109-
java.lang.Object readResolve();
110-
}
111-
112-
113-
# webView处理,项目中没有使用到webView忽略即可
114-
-keepclassmembers class cn.com.venvy.video.huoxbao.webview.InviteBridge {
115-
public *;
116-
}
117-
118-
-keepclassmembers class * extends android.app.Activity {
119-
public void *(android.view.View);
120-
}
121-
122-
-keep class com.bumptech.glide.**{*;}
123-
-dontwarn com.bumptech.glide.load.resource.bitmap.VideoDecoder
124-
-keep public class * implements com.bumptech.glide.module.GlideModule
125-
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
126-
**[] $VALUES;
127-
public *;
128-
}
129-
130-
-keep class com.alibaba.fastjson.** { *; }
131-
132-
133-
-keep class org.apache.http.** { *; }
134-
-dontwarn org.apache.http.**
135-
-keep class android.net.http.** { *; }
136-
-dontwarn android.net.http.**
137-
138-
### okhttp
139-
### see https://github.com/square/okhttp/blob/master/okhttp/src/main/resources/META-INF/proguard/okhttp3.pro
140-
-dontwarn javax.annotation.**
141-
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
142-
-dontwarn org.codehaus.mojo.animal_sniffer.*
143-
-dontwarn okhttp3.internal.platform.ConscryptPlatform
144-
145-
146-
147-
-keep class com.chad.library.adapter.** {
148-
*;
149-
}
150-
-keep public class * extends com.chad.library.adapter.base.BaseQuickAdapter
151-
-keep public class * extends com.chad.library.adapter.base.BaseViewHolder
152-
-keepclassmembers class **$** extends com.chad.library.adapter.base.BaseViewHolder {
153-
<init>(...);
154-
}
155-
156-
27+
-ignorewarnings
15728
#videojj
15829
-keep public class cn.com.venvy.processor.build.venvy_pub$$VenvyRoleMapUtil{ *; }
15930
-keep class cn.com.venvy.lua.** {
16031
<fields>;
16132
<methods>;
16233
}
163-
164-
165-
# videojj
166-
-keep class cn.com.venvy.** {
167-
<fields>;
168-
<methods>;
169-
}
170-
-keep class com.taobao.luaview.** {
171-
<fields>;
172-
<methods>;
173-
}
174-
-keep class org.luaj.vm2.** {
175-
<fields>;
176-
<methods>;
177-
}
17834
-keep class cn.com.videopls.** {
179-
*;
180-
}
181-
-dontwarn cn.com.videopls.**
182-
183-
# Mqtt
184-
-keep class org.eclipse.paho.client.mqttv3.** {
185-
<fields>;
186-
<methods>;
35+
<fields>;
36+
<methods>;
18737
}
18838

18939
#gsyPlayer
@@ -202,10 +52,4 @@
20252
public <init>(android.content.Context);
20353
public <init>(android.content.Context, android.util.AttributeSet);
20454
public <init>(android.content.Context, android.util.AttributeSet, int);
205-
}
206-
207-
-keep class com.just.agentweb.** {
208-
*;
209-
}
210-
-dontwarn com.just.agentweb.**
211-
-keepclassmembers class com.just.agentweb.sample.common.AndroidInterface{ *; }
55+
}
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
2-
"miniAppId":"123456",
32
"display":{
43
"navTitle":"开发模式测试"
54
},
65
"h5Url":"",
7-
"luaList":[
8-
{
9-
"url":"os_video_test_hotspot.lua"
10-
}
11-
],
12-
"template":"os_video_test_hotspot.lua"
6+
"miniAppInfo":{
7+
"miniAppId":"123456",
8+
"template":"os_video_test_hotspot.lua",
9+
"luaList":[
10+
{
11+
"url":"os_video_test_hotspot.lua"
12+
}
13+
]
14+
}
1315
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"creativeId":686,
3+
"data":{
4+
},
5+
"deviceType":3,
6+
"duration":30000,
7+
"hotspotOrder":0,
8+
"id":"8dc95f91-7c98-477b-a8fa-9586999ff228",
9+
"launchPlanId":"34520",
10+
"miniAppInfo":{
11+
"miniAppId":""
12+
},
13+
"sumHotspot":1,
14+
"template":"",
15+
"videoEndTime":35000,
16+
"videoStartTime":5000
17+
}
18+

VideoOS/videoos_dev_app/src/main/java/both/video/venvy/com/appdemo/MyApp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void onCreate() {
3333
appContext = this;
3434

3535
//测试环境
36-
DebugStatus.changeEnvironmentStatus(DebugStatus.EnvironmentStatus.RELEASE);
36+
DebugStatus.changeEnvironmentStatus(DebugStatus.EnvironmentStatus.DEV);
3737
VenvyLog.needLog = true;
3838
VideoPlus.appCreateSAAS(MyApp.this, ConfigUtil.getAppKey(), ConfigUtil.getAppSecret());
3939
}

VideoOS/videoos_dev_app/src/main/java/both/video/venvy/com/appdemo/activity/BasePlayerActivity.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ protected void startDefaultVideo(String videoId, String videoUrl) {
140140
}else{
141141
videoName = FileUtil.getFileName(ConfigUtil.getVideoName());
142142
}
143-
mVideoPlayer.setUp(TextUtils.isEmpty(videoUrl) ? ConfigUtil.getVideoName() : videoUrl, true, videoName);
143+
String url = TextUtils.isEmpty(videoUrl) ? ConfigUtil.getVideoName() : videoUrl;
144+
mVideoPlayer.setUp(url,true, videoName);
145+
mVideoPlayer.setPlayTag(url);
144146
}
145147
mVideoPlusView.start();
146148
// 开启前贴

VideoOS/videoos_dev_app/src/main/java/both/video/venvy/com/appdemo/activity/ConfigActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ private void initView() {
4141
appKeyView.setText(ConfigUtil.getAppKey());
4242
appSecretView.setText(ConfigUtil.getAppSecret());
4343
}
44-
// appKeyView.setText("dc8b6c9b-a592-4100-a532-9886ffce7dce");
45-
// appSecretView.setText("0b511c09045c4876");
44+
// appKeyView.setText("9085f724-5490-4331-9f3e-ae492e97f167");
45+
// appSecretView.setText("f57716f935b94378");
4646
}
4747

4848

0 commit comments

Comments
 (0)