update gradle script

pull/28/head
fengyuecanzhu 3 years ago
parent 94267db59b
commit beb7bbf7cf
No known key found for this signature in database
GPG Key ID: 04B78AD06A9D6E6C
  1. 29
      app/build.gradle
  2. 5
      app/src/main/assets/updatelog.fy
  3. 19980
      dynamic/dictionary_rules.txt
  4. 31
      dynamic/src/main/java/xyz/fycz/dynamic/StringFog.java
  5. 59
      dynamic/src/main/java/xyz/fycz/dynamic/StringFogImpl.java
  6. 5
      dynamic/src/main/java/xyz/fycz/dynamic/fix/App245Fix.kt

@ -26,7 +26,7 @@ def releaseTime() {
def commitId = 'git rev-parse --short HEAD'.execute().text.trim() def commitId = 'git rev-parse --short HEAD'.execute().text.trim()
def getVersionCode() { def getVersionC() {
def versionCodeFile = file('version_code.properties') def versionCodeFile = file('version_code.properties')
if (versionCodeFile.canRead()) { if (versionCodeFile.canRead()) {
Properties properties = new Properties() Properties properties = new Properties()
@ -44,30 +44,9 @@ def getVersionCode() {
} }
} }
def getVersionCodeNotIncrease() {
def versionCodeFile = file('version_code.properties')
if (versionCodeFile.canRead()) {
Properties properties = new Properties()
properties.load(new FileInputStream(versionCodeFile))
def versionCode = properties['VERSION_CODE'].toInteger()//version_code.properties文件存放的版本号
return versionCode
} else {
throw new FileNotFoundException("无法读取version_code.properties文件!")
}
}
def name = "风月读书" def name = "风月读书"
def version = getVersionCode() def versionC = getVersionC()
def versionN = versionC.toString().join(".")
def getVersionName(){
def version = getVersionCodeNotIncrease()
def hun = (version / 100).toInteger()
def ten = (version / 10).toInteger() % 10
def one = version % 10
return hun + "." + ten + "." + one
}
def versionN = getVersionName()
// keystore.properties // keystore.properties
def keyProps = new Properties() def keyProps = new Properties()
@ -84,7 +63,7 @@ android {
applicationId "xyz.fycz.myreader" applicationId "xyz.fycz.myreader"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 29 targetSdkVersion 29
versionCode version versionCode versionC
versionName versionN versionName versionN
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
} }

@ -1,3 +1,8 @@
2022.05.28
风月读书v2.4.6
更新内容:
1、修复书源过多时搜索界面卡死的问题
2022.05.22 2022.05.22
风月读书v2.4.5 风月读书v2.4.5
更新内容: 更新内容:

File diff suppressed because it is too large Load Diff

@ -0,0 +1,31 @@
/*
* This file is part of FYReader.
* FYReader is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FYReader is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with FYReader. If not, see <https://www.gnu.org/licenses/>.
*
* Copyright (C) 2020 - 2022 fengyuecanzhu
*/
package xyz.fycz.dynamic;
/**
* Generated code from StringFog gradle plugin. Do not modify!
*/
public final class StringFog {
private static final StringFogImpl IMPL = new StringFogImpl();
public static String decrypt(byte[] value, byte[] key) {
return IMPL.decrypt(value, key);
}
}

@ -0,0 +1,59 @@
/*
* This file is part of FYReader.
* FYReader is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FYReader is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with FYReader. If not, see <https://www.gnu.org/licenses/>.
*
* Copyright (C) 2020 - 2022 fengyuecanzhu
*/
package xyz.fycz.dynamic;
import java.nio.charset.StandardCharsets;
/**
* StringFog xor encrypt and decrypt implementation.
*
* @author Megatron King
* @since 2018/9/2 14:34
*/
public final class StringFogImpl {
public byte[] encrypt(String data, byte[] key) {
return xor(data.getBytes(StandardCharsets.UTF_8), key);
}
public String decrypt(byte[] data, byte[] key) {
return new String(xor(data, key), StandardCharsets.UTF_8);
}
public boolean shouldFog(String data) {
return true;
}
private static byte[] xor(byte[] data, byte[] key) {
int len = data.length;
int lenKey = key.length;
int i = 0;
int j = 0;
while (i < len) {
if (j >= lenKey) {
j = 0;
}
data[i] = (byte) (data[i] ^ key[j]);
i++;
j++;
}
return data;
}
}

@ -65,7 +65,7 @@ class App245Fix : AppFixHandle {
) + "&appVersion=" + App.getVersionCode() ) + "&appVersion=" + App.getVersionCode()
auth = try { auth = try {
EncoderUtils.encryptAES2Base64( EncoderUtils.encryptAES2Base64(
auth.toByteArray(), DO_FILTER_KEY, auth.toByteArray(), "79qdunN8534y44T3".toByteArray(),
"AES/ECB/PKCS5Padding" "AES/ECB/PKCS5Padding"
)?.let { String(it) }.toString() )?.let { String(it) }.toString()
} catch (e: Exception) { } catch (e: Exception) {
@ -75,7 +75,4 @@ class App245Fix : AppFixHandle {
"&deviceId=" + UserService.getUUID() + "&deviceId=" + UserService.getUUID() +
"&isDebug=" + App.isDebug() "&isDebug=" + App.isDebug()
} }
val DO_FILTER_KEY = "79qdunN8534y44T3".toByteArray()
} }
Loading…
Cancel
Save