update gradle script

Signed-off-by: fengyuecanzhu <1021300691@qq.com>
pull/28/head
fengyuecanzhu 3 years ago
parent beb7bbf7cf
commit 620e5e085e
No known key found for this signature in database
GPG Key ID: 04B78AD06A9D6E6C
  1. 2
      app/build.gradle
  2. 3
      app/src/test/java/Test.java
  3. 2
      app/version_code.properties
  4. 29
      dynamic/build.gradle
  5. 6
      dynamic/proguard-rules.pro
  6. 7
      dynamic/src/androidTest/java/xyz/fycz/dynamic/ExampleInstrumentedTest.kt
  7. 3
      dynamic/src/main/java/xyz/fycz/dynamic/AppLoadImpl.kt

@ -46,7 +46,7 @@ def getVersionC() {
def name = "风月读书" def name = "风月读书"
def versionC = getVersionC() def versionC = getVersionC()
def versionN = versionC.toString().join(".") def versionN = versionC.toString().join("", ".")
// keystore.properties // keystore.properties
def keyProps = new Properties() def keyProps = new Properties()

@ -21,6 +21,7 @@ import org.seimicrawler.xpath.JXDocument;
import java.io.File; import java.io.File;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Base64;
import java.util.List; import java.util.List;
import xyz.fycz.myreader.model.sourceAnalyzer.BaseAnalyzer; import xyz.fycz.myreader.model.sourceAnalyzer.BaseAnalyzer;
@ -135,7 +136,7 @@ public class Test {
@org.junit.Test @org.junit.Test
public void md5(){ public void md5(){
File file = new File("D:\\Java\\AndroidSdk\\build-tools\\29.0.3\\dynamic_v1.0.5.dex"); File file = new File("D:\\Java\\AndroidSdk\\build-tools\\29.0.3\\dynamic_v1.0.6.dex");
System.out.println(MD5Utils.INSTANCE.getFileMD5s(file, 32)); System.out.println(MD5Utils.INSTANCE.getFileMD5s(file, 32));
} }
} }

@ -18,4 +18,4 @@
#Fri Jun 18 21:45:31 CST 2021 #Fri Jun 18 21:45:31 CST 2021
VERSION_CODE=246 VERSION_CODE=246
CREATE_RELEASE=true CREATE_RELEASE=false

@ -19,6 +19,8 @@
plugins { plugins {
id 'com.android.library' id 'com.android.library'
id 'org.jetbrains.kotlin.android' id 'org.jetbrains.kotlin.android'
id 'stringfog'
id 'top.niunaijun.blackobfuscator'
} }
android { android {
@ -47,6 +49,32 @@ android {
} }
} }
stringfog {
//
implementation 'com.github.megatronking.stringfog.xor.StringFogImpl'
//
enable false
//
fogPackages = ['xyz.fycz.dynamic']
// 使2,
// HardCodeKeyGenerator("This is a key")
//
debug true
}
//
BlackObfuscator {
//
enabled false
//
depth 5
// ()
obfClass = ["xyz.fycz.dynamic"]
// blackClass中的包或者类不会进行混淆()
blackClass = []
}
dependencies { dependencies {
compileOnly("androidx.core:core-ktx:$kotlin_version") compileOnly("androidx.core:core-ktx:$kotlin_version")
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
@ -56,4 +84,5 @@ dependencies {
compileOnly 'org.greenrobot:greendao:3.3.0' compileOnly 'org.greenrobot:greendao:3.3.0'
compileOnly project(":app") compileOnly project(":app")
compileOnly project(":DialogX") compileOnly project(":DialogX")
api 'com.github.megatronking.stringfog:xor:3.0.0'
} }

@ -18,4 +18,8 @@
# If you keep the line number information, uncomment this to # If you keep the line number information, uncomment this to
# hide the original source file name. # hide the original source file name.
#-renamesourcefileattribute SourceFile #-renamesourcefileattribute SourceFile
# 混淆字典
-obfuscationdictionary dictionary_rules.txt
-classobfuscationdictionary dictionary_rules.txt
-packageobfuscationdictionary dictionary_rules.txt

@ -18,14 +18,14 @@
package xyz.fycz.dynamic package xyz.fycz.dynamic
import android.util.Base64
import android.util.Log
import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.ext.junit.runners.AndroidJUnit4
import me.fycz.maple.MapleUtils
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import xyz.fycz.dynamic.fix.App243Fix
import xyz.fycz.myreader.application.App
/** /**
* Instrumented test, which will execute on an Android device. * Instrumented test, which will execute on an Android device.
@ -37,5 +37,6 @@ class ExampleInstrumentedTest {
@Test @Test
fun testFix() { fun testFix() {
// Context of the app under test. // Context of the app under test.
Log.d("asdas", Base64.encodeToString("asdasd".toByteArray(), Base64.NO_WRAP))
} }
} }

@ -18,7 +18,6 @@
package xyz.fycz.dynamic package xyz.fycz.dynamic
import android.app.AlertDialog
import android.content.Context import android.content.Context
import android.content.SharedPreferences import android.content.SharedPreferences
import android.os.Bundle import android.os.Bundle
@ -74,7 +73,7 @@ class AppLoadImpl : IAppLoader {
} }
if (sb.isNotEmpty()) { if (sb.isNotEmpty()) {
if (sb.endsWith("\n")) sb.substring(0, sb.length - 1) if (sb.endsWith("\n")) sb.substring(0, sb.length - 1)
val key = "fix244-2" val key = "fix245"
val hasRead = spu.getBoolean(key, false) val hasRead = spu.getBoolean(key, false)
if (!hasRead) { if (!hasRead) {
announce("插件更新", "更新内容:\n$sb") announce("插件更新", "更新内容:\n$sb")

Loading…
Cancel
Save