Skip to content

Commit

Permalink
0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
mainlxl committed Dec 2, 2021
1 parent f80e8b6 commit 75ea2a5
Show file tree
Hide file tree
Showing 70 changed files with 179 additions and 46 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ allprojects {
}
```
2. 复制工程下[so-file-config.gradle](so-file-config.gradle)到工程根目录
3. 工程根目录**gradle.properties**中添加`SO_PLUGIN_VERSION=0.0.5`
3. 工程根目录**gradle.properties**中添加`SO_PLUGIN_VERSION=0.0.6`
**build.gradle**中添加`classpath "com.imf.so:load-hook-plugin:${SO_PLUGIN_VERSION}"``classpath "com.imf.so:file-plugin:${SO_PLUGIN_VERSION}"`
4. **app****build.gradle**中添加`apply from: "${rootDir}/so-file-config.gradle"`
5. 在Application中调用`AssetsSoLoadBy7zFileManager.init(v.getContext());`初始化,重载方法支持传入NeedDownloadSoListener完成云端所需要so库下载,下载后使用SoFileInfo#insertOrUpdateCache(saveLibsDir,File)插入缓存中
6. 修改根目录中[so-file-config.gradle](so-file-config.gradle)进行压缩删减库配置主要修改deleteSoLibs与compressSo2AssetsLibs如下:
Expand Down
4 changes: 2 additions & 2 deletions android-un7z/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ android {

defaultConfig {
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName '1.0.0'
consumerProguardFiles 'consumer-proguard-rules.pro'
}
externalNativeBuild {
cmake {
Expand All @@ -27,7 +27,7 @@ android {
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
proguardFiles 'consumer-proguard-rules.pro'
}
}
compileOptions {
Expand Down
16 changes: 16 additions & 0 deletions android-un7z/consumer-proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#-verbose #打印混淆的详细信息
#-optimizationpasses 5 #指定代码的压缩级别
#-dontoptimize #不进行优化,建议使用此选项,
#-dontpreverify #不进行预校验,Android不需要,可加快混淆速度。
#-ignorewarnings #忽略警告

#-dontshrink #声明不进行压缩操作,默认情况下,除了-keep配置(下详)的类及其直接或间接引用到的类,都会被移除。


-keep class com.hzy.lib7z.Z7Extractor {
public native <methods>;
}

-keep interface com.hzy.lib7z.IExtractCallback {
<methods>;
}
34 changes: 17 additions & 17 deletions android-un7z/src/main/java/com/hzy/lib7z/ErrorCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
* Created by huzongyao on 17-11-24.
*/

public class ErrorCode {
public interface ErrorCode {

public static final int SZ_OK = 0;
int SZ_OK = 0;

public static final int SZ_ERROR_DATA = 1;
public static final int SZ_ERROR_MEM = 2;
public static final int SZ_ERROR_CRC = 3;
public static final int SZ_ERROR_UNSUPPORTED = 4;
public static final int SZ_ERROR_PARAM = 5;
public static final int SZ_ERROR_INPUT_EOF = 6;
public static final int SZ_ERROR_OUTPUT_EOF = 7;
public static final int SZ_ERROR_READ = 8;
public static final int SZ_ERROR_WRITE = 9;
public static final int SZ_ERROR_PROGRESS = 10;
public static final int SZ_ERROR_FAIL = 11;
public static final int SZ_ERROR_THREAD = 12;
int SZ_ERROR_DATA = 1;
int SZ_ERROR_MEM = 2;
int SZ_ERROR_CRC = 3;
int SZ_ERROR_UNSUPPORTED = 4;
int SZ_ERROR_PARAM = 5;
int SZ_ERROR_INPUT_EOF = 6;
int SZ_ERROR_OUTPUT_EOF = 7;
int SZ_ERROR_READ = 8;
int SZ_ERROR_WRITE = 9;
int SZ_ERROR_PROGRESS = 10;
int SZ_ERROR_FAIL = 11;
int SZ_ERROR_THREAD = 12;

public static final int SZ_ERROR_ARCHIVE = 16;
public static final int SZ_ERROR_NO_ARCHIVE = 17;
int SZ_ERROR_ARCHIVE = 16;
int SZ_ERROR_NO_ARCHIVE = 17;

public static final int ERROR_CODE_PATH_ERROR = 999;
int ERROR_CODE_PATH_ERROR = 999;
}
3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ android {

buildTypes {
release {
minifyEnabled false
signingConfig signingConfigs.debug
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/imf/test/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void run() {
stringBuilder.append("源码引入: ").append(NativeSourceTest.stringFromJNI()).append('\n');
stringBuilder.append("aar引入: ").append(NativeLibTest.stringFromJNI()).append('\n');
stringBuilder.append("子工程引入: ").append(NativeTestLibrary.stringFromJNI()).append('\n');
image.setImageBitmap(BitmapBlur.blur(bitmap, 10));
image.setImageBitmap(BitmapBlur.blur(bitmap, 25));
stringBuilder.append("Maven引入: >背景图片变模糊<");
tv.setText(stringBuilder.toString());
updateCacheDir();
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ android.enableJetifier=true

ANDROID_GRADLE_VERSION=3.6.0
#SO_PLUGIN_VERSION=0.0.4-SNAPSHOT
SO_PLUGIN_VERSION=0.0.5
SO_PLUGIN_VERSION=0.0.6
userPlugin=true
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ private static JSONObject loadAssetsConfigJson(Context context) {
* @param libName
*/
public static void loadLibraryAndDependencies(String libName) {
LogUtil.printDebug(libName, " - 加在进程:", LoadUtils.getCurrentProcessByCache());
if (LoadRecordHelp.isLoaded(libName)) {
LogUtil.printDebug("重复加载" + libName);
LogUtil.printDebug("重复加载:", libName);
return;
}
SoFileInfo soFileInfoByName = sSoLoadInfo.getSoFileInfoByName(libName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ private static StringBuilder joinBuilder(Object... str) {

public static void printDebug(Object... msg) {
if (sLogEnable) {
StringBuilder builder = joinBuilder("Thread(", Thread.currentThread().getName(), ")");
StringBuilder builder = new StringBuilder();
for (Object s : msg) {
builder.append(s);
}
builder.append(" - Thread(").append(Thread.currentThread().getName()).append(")");
print(DEBUG, null, builder.toString());
}
}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
700288ee1ddd7d38e26f6924a82df7db
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
075f8d6f5c3091402110a12265f7bca99512ad1a
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f1baf59a8c7d36f01422733d57c5d0fe
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
61af36f11b9393274cd5a46d7be6a4d1ce6c9a46
9 changes: 9 additions & 0 deletions maven/com/imf/so/android-un7z/0.0.6/android-un7z-0.0.6.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.imf.so</groupId>
<artifactId>android-un7z</artifactId>
<version>0.0.6</version>
<packaging>aar</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d6c91ca8992d16eab26d30259dd72378
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
250bde873ade27c071597a946195f5612c3fc529
5 changes: 3 additions & 2 deletions maven/com/imf/so/android-un7z/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
<groupId>com.imf.so</groupId>
<artifactId>android-un7z</artifactId>
<versioning>
<release>0.0.5</release>
<release>0.0.6</release>
<versions>
<version>0.0.1</version>
<version>0.0.2</version>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.3</version>
<version>0.0.4</version>
<version>0.0.5</version>
<version>0.0.6</version>
</versions>
<lastUpdated>20211022121428</lastUpdated>
<lastUpdated>20211202061847</lastUpdated>
</versioning>
</metadata>
2 changes: 1 addition & 1 deletion maven/com/imf/so/android-un7z/maven-metadata.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8782f871e06d07cf829f62b75d5e4610
4411735accee9e0298d4bc5dec5709b1
2 changes: 1 addition & 1 deletion maven/com/imf/so/android-un7z/maven-metadata.xml.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5c274eccb6809a1ae19be78da33ab1fdb254a00d
3803bbf1008cdbe8fdab895acf13d5bf6702cc04
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9f58a0d9c45bf5776e15b7314665e59b
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
061c08bfd93acb4f195b357814f3d9f4f53b6279
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f5baf37731efa56927a8ea70eaa10063
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
232b2b7b13b4be5cd0807b7f9d799d5e1344b4a3
15 changes: 15 additions & 0 deletions maven/com/imf/so/file-plugin/0.0.6/file-plugin-0.0.6.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.imf.so</groupId>
<artifactId>file-plugin</artifactId>
<version>0.0.6</version>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>1.3.72</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2ec7fc66ad6d72aa24e204c11b6bfda1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b6ecbf87af4dc6ccc32618c248d1e015fbbdc0c1
5 changes: 3 additions & 2 deletions maven/com/imf/so/file-plugin/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
<groupId>com.imf.so</groupId>
<artifactId>file-plugin</artifactId>
<versioning>
<release>0.0.5</release>
<release>0.0.6</release>
<versions>
<version>0.0.1</version>
<version>0.0.2</version>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.3</version>
<version>0.0.4</version>
<version>0.0.5</version>
<version>0.0.6</version>
</versions>
<lastUpdated>20211022121432</lastUpdated>
<lastUpdated>20211202061854</lastUpdated>
</versioning>
</metadata>
2 changes: 1 addition & 1 deletion maven/com/imf/so/file-plugin/maven-metadata.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7027dcb32a932bc2f8ed69c7acb95ccd
6c8a72d2709e80566000e6a3016e582e
2 changes: 1 addition & 1 deletion maven/com/imf/so/file-plugin/maven-metadata.xml.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1c20ec964b251a5d2b900b06030d433f9560cb3d
87af4525b4994449815a5c04365f6f05b136e186
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dd096e40285baa681f6b47c2240819fe
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6dbd75f809d1ffd472cb7ec9322ec64041a7c1a1
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
977f7c7a67f08a82161e5d15c7ca0e8f
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
eba306412c1a415b6e612aea24cb23a1b678e201
23 changes: 23 additions & 0 deletions maven/com/imf/so/load-assets-7z/0.0.6/load-assets-7z-0.0.6.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.imf.so</groupId>
<artifactId>load-assets-7z</artifactId>
<version>0.0.6</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>com.imf.so</groupId>
<artifactId>load-hook</artifactId>
<version>0.0.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.imf.so</groupId>
<artifactId>android-un7z</artifactId>
<version>0.0.6</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8f722af320f01e6dbd99bbd9a64d3a7a
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8bd6497e5ee9b5f59400c35a29f893119bacfe75
5 changes: 3 additions & 2 deletions maven/com/imf/so/load-assets-7z/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
<groupId>com.imf.so</groupId>
<artifactId>load-assets-7z</artifactId>
<versioning>
<release>0.0.5</release>
<release>0.0.6</release>
<versions>
<version>0.0.1</version>
<version>0.0.2</version>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.3</version>
<version>0.0.4</version>
<version>0.0.5</version>
<version>0.0.6</version>
</versions>
<lastUpdated>20211025070648</lastUpdated>
<lastUpdated>20211202061901</lastUpdated>
</versioning>
</metadata>
2 changes: 1 addition & 1 deletion maven/com/imf/so/load-assets-7z/maven-metadata.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6d21ca46f9a4c737a88a6d6ca1027c28
d796d158521daa71f1e58e7802f87701
2 changes: 1 addition & 1 deletion maven/com/imf/so/load-assets-7z/maven-metadata.xml.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8ed3fbca381fbcf29f8b3a6df6018d2c6a7eda79
1acc29dfc7b51622359dd5eb9df103f99e5bd3a6
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f19b6a7486f211b536a74df22ae2a9f4
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e232b81fcecb4db7bc5d2e077baabb914baa15ab
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
43a1385f0c63ef9ab9798147e106b11c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4a3200fc4abc87e39039de09596f4a8be5bbe1d8
22 changes: 22 additions & 0 deletions maven/com/imf/so/load-hook-plugin/0.0.6/load-hook-plugin-0.0.6.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.imf.so</groupId>
<artifactId>load-hook-plugin</artifactId>
<version>0.0.6</version>
<dependencies>
<dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>gradle</artifactId>
<version>3.6.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.android.tools.build</groupId>
<artifactId>gradle-api</artifactId>
<version>3.6.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
628ea0a376659b03b1aba39ff2fc9a6e
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f3383675b7c2f71b79b2b8afc8723d5643d13ac0
5 changes: 3 additions & 2 deletions maven/com/imf/so/load-hook-plugin/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
<groupId>com.imf.so</groupId>
<artifactId>load-hook-plugin</artifactId>
<versioning>
<release>0.0.5</release>
<release>0.0.6</release>
<versions>
<version>0.0.1</version>
<version>0.0.2</version>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.3</version>
<version>0.0.4</version>
<version>0.0.5</version>
<version>0.0.6</version>
</versions>
<lastUpdated>20211022121436</lastUpdated>
<lastUpdated>20211202061859</lastUpdated>
</versioning>
</metadata>
2 changes: 1 addition & 1 deletion maven/com/imf/so/load-hook-plugin/maven-metadata.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5acd2a337457d064a469809eda48b745
cd9513530db10ace40debc612637cfaa
Loading

0 comments on commit 75ea2a5

Please sign in to comment.