Commit 21faa20cf90881ff8c22c8d913177754fcaca1e3
1 parent
7cf879a0
更新推流SDKjar包,添加混淆信息
Showing
7 changed files
with
92 additions
and
41 deletions
app/build.gradle
| @@ -3,18 +3,34 @@ apply plugin: 'com.android.application' | @@ -3,18 +3,34 @@ apply plugin: 'com.android.application' | ||
| 3 | android { | 3 | android { |
| 4 | compileSdkVersion 25 | 4 | compileSdkVersion 25 |
| 5 | buildToolsVersion '25.0.0' | 5 | buildToolsVersion '25.0.0' |
| 6 | - | ||
| 7 | defaultConfig { | 6 | defaultConfig { |
| 8 | applicationId "com.cnlive.demo.stream" | 7 | applicationId "com.cnlive.demo.stream" |
| 9 | minSdkVersion 16 | 8 | minSdkVersion 16 |
| 10 | targetSdkVersion 22 | 9 | targetSdkVersion 22 |
| 11 | versionCode 1 | 10 | versionCode 1 |
| 12 | versionName "1.0" | 11 | versionName "1.0" |
| 12 | + multiDexEnabled true | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + signingConfigs { | ||
| 16 | + myConfig { | ||
| 17 | + storeFile file("streamdemo4.jks") | ||
| 18 | + storePassword "123456" | ||
| 19 | + keyAlias "streamdemo" | ||
| 20 | + keyPassword "123456" | ||
| 21 | + } | ||
| 13 | } | 22 | } |
| 23 | + | ||
| 14 | buildTypes { | 24 | buildTypes { |
| 15 | release { | 25 | release { |
| 16 | minifyEnabled true | 26 | minifyEnabled true |
| 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | 27 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 28 | + signingConfig signingConfigs.myConfig | ||
| 29 | + } | ||
| 30 | + debug { | ||
| 31 | + minifyEnabled false | ||
| 32 | + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
| 33 | + debuggable true | ||
| 18 | } | 34 | } |
| 19 | } | 35 | } |
| 20 | } | 36 | } |
app/libs/libcnlivestream.jar
No preview for this file type
app/libs/libcnlivevideo.jar
0 → 100644
No preview for this file type
app/proguard-rules.pro
| @@ -15,3 +15,71 @@ | @@ -15,3 +15,71 @@ | ||
| 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { | 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { |
| 16 | # public *; | 16 | # public *; |
| 17 | #} | 17 | #} |
| 18 | +# 通用混淆配置 | ||
| 19 | +#不混淆泛型 -keepattributes SourceFile | ||
| 20 | +-keepattributes Signature,InnerClasses,Exceptions,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod | ||
| 21 | + | ||
| 22 | + -optimizationpasses 5 | ||
| 23 | + -dontusemixedcaseclassnames | ||
| 24 | + -dontskipnonpubliclibraryclasses | ||
| 25 | + -dontpreverify | ||
| 26 | + -verbose | ||
| 27 | + -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* | ||
| 28 | + | ||
| 29 | + #忽略警告 也可以用-ignorewarnings | ||
| 30 | + -dontwarn | ||
| 31 | + | ||
| 32 | + -keep public class * extends android.app.Activity | ||
| 33 | + -keep public class * extends android.app.Application | ||
| 34 | + -keep public class * extends android.app.Service | ||
| 35 | + -keep public class * extends android.content.BroadcastReceiver | ||
| 36 | + -keep public class * extends android.content.ContentProvider | ||
| 37 | + -keep public class * extends android.app.backup.BackupAgentHelper | ||
| 38 | + -keep public class * extends android.preference.Preference | ||
| 39 | + -keep public class com.android.vending.licensing.ILicensingService | ||
| 40 | + | ||
| 41 | + -keepclasseswithmembernames class * { | ||
| 42 | + native <methods>; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + -keepclasseswithmembers class * { | ||
| 46 | + public <init>(android.content.Context, android.util.AttributeSet); | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + -keepclasseswithmembers class * { | ||
| 50 | + public <init>(android.content.Context, android.util.AttributeSet, int); | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + -keepclassmembers class * extends android.app.Activity { | ||
| 54 | + public void *(android.view.View); | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + -keepclassmembers enum * { | ||
| 58 | + public static **[] values(); | ||
| 59 | + public static ** valueOf(java.lang.String); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + -keep class * implements android.os.Parcelable { | ||
| 63 | + public static final android.os.Parcelable$Creator *; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | +-dontwarn com.ksy.** | ||
| 67 | +-dontwarn com.ksyun.** | ||
| 68 | + | ||
| 69 | +-keep class com.ksy.**{*;} | ||
| 70 | +-keep class com.ksyun.**{*;} | ||
| 71 | + | ||
| 72 | +-keep class com.cnlive.libs.**{*;} | ||
| 73 | + | ||
| 74 | +-keep class io.rong.** {*;} | ||
| 75 | + -keep class * implements io.rong.imlib.model.MessageContent {*;} | ||
| 76 | + -dontwarn io.rong.push.** | ||
| 77 | + -dontnote com.xiaomi.** | ||
| 78 | + -dontnote com.google.android.gms.gcm.** | ||
| 79 | + -dontnote io.rong.** | ||
| 80 | + -keep public class * extends android.content.BroadcastReceiver | ||
| 81 | + | ||
| 82 | + -dontwarn com.shiliantong.** | ||
| 83 | + -dontwarn com.slt.** | ||
| 84 | + -keep class com.shiliantong.**{*;} | ||
| 85 | + -keep class com.slt.**{*;} | ||
| 18 | \ No newline at end of file | 86 | \ No newline at end of file |
app/src/androidTest/java/com/cnlive/libs/ApplicationTest.java deleted
100644 → 0
| 1 | -package com.cnlive.libs; | ||
| 2 | - | ||
| 3 | -import android.app.Application; | ||
| 4 | -import android.test.ApplicationTestCase; | ||
| 5 | - | ||
| 6 | -/** | ||
| 7 | - * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> | ||
| 8 | - */ | ||
| 9 | -public class ApplicationTest extends ApplicationTestCase<Application> { | ||
| 10 | - public ApplicationTest() { | ||
| 11 | - super(Application.class); | ||
| 12 | - } | ||
| 13 | -} | ||
| 14 | \ No newline at end of file | 0 | \ No newline at end of file |
app/src/main/java/com/cnlive/demo/stream/StreamActivity.java
| @@ -526,19 +526,14 @@ public class StreamActivity extends Activity { | @@ -526,19 +526,14 @@ public class StreamActivity extends Activity { | ||
| 526 | } | 526 | } |
| 527 | 527 | ||
| 528 | private void onBeautyChecked(boolean isChecked) { | 528 | private void onBeautyChecked(boolean isChecked) { |
| 529 | - if (isChecked) { | ||
| 530 | - if (mStreamer.getVideoEncodeMethod() == | ||
| 531 | - IStreamer.ENCODE_METHOD_SOFTWARE_COMPAT) { | ||
| 532 | - mStreamer.getImgTexFilterMgt().setFilter(mStreamer.getGLRender(), | ||
| 533 | - DENOISE.getFilter()); | ||
| 534 | - mStreamer.setEnableImgBufBeauty(true); | ||
| 535 | - } else { | ||
| 536 | -// showChooseFilter(); | ||
| 537 | - mBeautyChooseView.setVisibility(isChecked ? View.VISIBLE : View.INVISIBLE); | ||
| 538 | - } | 529 | + if (mStreamer.getVideoEncodeMethod() == |
| 530 | + IStreamer.ENCODE_METHOD_SOFTWARE_COMPAT) { | ||
| 531 | + mStreamer.getImgTexFilterMgt().setFilter(mStreamer.getGLRender(), | ||
| 532 | + DENOISE.getFilter()); | ||
| 533 | + mStreamer.setEnableImgBufBeauty(true); | ||
| 539 | } else { | 534 | } else { |
| 540 | - mStreamer.getImgTexFilterMgt().setFilter(mStreamer.getGLRender(), BEAUTY_DISABLE.getFilter()); | ||
| 541 | - mStreamer.setEnableImgBufBeauty(false); | 535 | +// showChooseFilter(); |
| 536 | + mBeautyChooseView.setVisibility(isChecked ? View.VISIBLE : View.INVISIBLE); | ||
| 542 | } | 537 | } |
| 543 | } | 538 | } |
| 544 | 539 |
app/src/test/java/com/cnlive/libs/ExampleUnitTest.java deleted
100644 → 0
| 1 | -package com.cnlive.libs; | ||
| 2 | - | ||
| 3 | -import org.junit.Test; | ||
| 4 | - | ||
| 5 | -import static org.junit.Assert.*; | ||
| 6 | - | ||
| 7 | -/** | ||
| 8 | - * To work on unit tests, switch the Test Artifact in the Build Variants view. | ||
| 9 | - */ | ||
| 10 | -public class ExampleUnitTest { | ||
| 11 | - @Test | ||
| 12 | - public void addition_isCorrect() throws Exception { | ||
| 13 | - assertEquals(4, 2 + 2); | ||
| 14 | - } | ||
| 15 | -} | ||
| 16 | \ No newline at end of file | 0 | \ No newline at end of file |