diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 481bb434..ce1be81d 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,21 +1,25 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html +# Merge +-flattenpackagehierarchy com.github.catvod.spider.merge +-repackageclasses com.github.catvod.spider.merge -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} +# Spider +-keep class com.github.catvod.crawler.* { *; } +-keep class com.github.catvod.spider.* { public ; } +-keep class com.github.catvod.parser.* { public ; } -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable +# Gson +-keepattributes Signature +-keepattributes *Annotation* +-dontwarn sun.misc.** +-keep class com.google.gson.examples.android.model.** { ; } +-keep class * extends com.google.gson.TypeAdapter +-keep class * implements com.google.gson.TypeAdapterFactory +-keep class * implements com.google.gson.JsonSerializer +-keep class * implements com.google.gson.JsonDeserializer +-keepclassmembers,allowobfuscation class * { @com.google.gson.annotations.SerializedName ; } +-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken +-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +# OkHttp +-dontwarn okhttp3.** +-keep class okhttp3.** { *; } diff --git a/buildAndGenJar.bat b/buildAndGenJar.bat new file mode 100644 index 00000000..72e0b5c6 --- /dev/null +++ b/buildAndGenJar.bat @@ -0,0 +1,7 @@ +@echo off + +call "%~dp0\gradlew" assembleRelease --no-daemon + +call "%~dp0\jar\genJar.bat" %1 + +pause \ No newline at end of file diff --git a/jar/3rd/apktool_2.4.1.jar b/jar/3rd/apktool_2.4.1.jar new file mode 100644 index 00000000..28ce1e50 Binary files /dev/null and b/jar/3rd/apktool_2.4.1.jar differ diff --git a/jar/3rd/baksmali-2.5.2.jar b/jar/3rd/baksmali-2.5.2.jar new file mode 100644 index 00000000..b548bfc5 Binary files /dev/null and b/jar/3rd/baksmali-2.5.2.jar differ diff --git a/jar/3rd/oss.jar b/jar/3rd/oss.jar new file mode 100644 index 00000000..2949336f Binary files /dev/null and b/jar/3rd/oss.jar differ diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar new file mode 100644 index 00000000..982fb153 Binary files /dev/null and b/jar/custom_spider.jar differ diff --git a/jar/custom_spider.jar.md5 b/jar/custom_spider.jar.md5 new file mode 100644 index 00000000..51d124aa --- /dev/null +++ b/jar/custom_spider.jar.md5 @@ -0,0 +1 @@ +e79ee1c89df18b03332b1f342ca44d2f diff --git a/jar/genJar.bat b/jar/genJar.bat new file mode 100644 index 00000000..9570ee4d --- /dev/null +++ b/jar/genJar.bat @@ -0,0 +1,32 @@ +@echo off + +del "%~dp0\custom_spider.jar" +rd /s/q "%~dp0\Smali_classes" + +java -jar "%~dp0\3rd\baksmali-2.5.2.jar" d "%~dp0\..\app\build\intermediates\dex\release\minifyReleaseWithR8\classes.dex" -o "%~dp0\Smali_classes" + +rd /s/q "%~dp0\spider.jar\smali\com\github\catvod\spider" +rd /s/q "%~dp0\spider.jar\smali\com\github\catvod\parser" + +if not exist "%~dp0\spider.jar\smali\com\github\catvod\" md "%~dp0\spider.jar\smali\com\github\catvod\" + +if "%1" == "ec" ( + java -Dfile.encoding=utf-8 -jar "%~dp0\3rd\oss.jar" "%~dp0\Smali_classes" +) + +move "%~dp0\Smali_classes\com\github\catvod\spider" "%~dp0\spider.jar\smali\com\github\catvod\" +move "%~dp0\Smali_classes\com\github\catvod\parser" "%~dp0\spider.jar\smali\com\github\catvod\" + +rd /s/q "%~dp0\Smali_classes" + +java -jar "%~dp0\3rd\apktool_2.4.1.jar" b "%~dp0\spider.jar" -c + +move "%~dp0\spider.jar\dist\dex.jar" "%~dp0\custom_spider.jar" + +certUtil -hashfile "%~dp0\custom_spider.jar" MD5 | find /i /v "md5" | find /i /v "certutil" > "%~dp0\custom_spider.jar.md5" + +rd /s/q "%~dp0\spider.jar\smali\com\github\catvod\spider" +rd /s/q "%~dp0\spider.jar\smali\com\github\catvod\parser" + +rd /s/q "%~dp0\spider.jar\build" +rd /s/q "%~dp0\spider.jar\dist" diff --git a/jar/spider.jar/apktool.yml b/jar/spider.jar/apktool.yml new file mode 100644 index 00000000..975be9f6 --- /dev/null +++ b/jar/spider.jar/apktool.yml @@ -0,0 +1,13 @@ +!!brut.androlib.meta.MetaInfo +apkFileName: dex.jar +compressionType: false +doNotCompress: null +isFrameworkApk: false +packageInfo: null +sdkInfo: null +sharedLibrary: false +sparseResources: false +unknownFiles: +usesFramework: null +version: 2.4.1_0303 +versionInfo: null diff --git a/jar/spider.jar/original/META-INF/MANIFEST.MF b/jar/spider.jar/original/META-INF/MANIFEST.MF new file mode 100644 index 00000000..2b417306 --- /dev/null +++ b/jar/spider.jar/original/META-INF/MANIFEST.MF @@ -0,0 +1,4 @@ +Manifest-Version: 1.0 +Dex-Location: classes.dex +Created-By: dx 1.11 +