forked from mainlxl/Android-So-Handler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
27 additions
and
25 deletions.
There are no files selected for viewing
28 changes: 10 additions & 18 deletions
28
file-plugin/src/main/kotlin/com/imf/plugin/so/HandleSoFileInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
package com.imf.plugin.so | ||
|
||
class HandleSoFileInfo(val saveCompressToAssets: Boolean, val md5: String?, val dependencies: List<String>?, val compressName: String?) { | ||
import com.google.gson.Gson | ||
|
||
data class HandleSoFileInfo( | ||
var saveCompressToAssets: Boolean, | ||
var md5: String?, | ||
var dependencies: List<String>? = null, | ||
var compressName: String? = null, | ||
var url: String? = null | ||
) { | ||
//用于生成json | ||
override fun toString(): String { | ||
val s = StringBuilder("{\"saveCompressToAssets\":${saveCompressToAssets}") | ||
if (!dependencies.isNullOrEmpty()) { | ||
s.append(",\"dependencies\":[\"${dependencies[0]}\"") | ||
for (index in 1 until dependencies.size) { | ||
s.append(",\"${dependencies[index]}\"") | ||
} | ||
s.append(']') | ||
} | ||
md5?.let { | ||
s.append(",\"md5\":\"${md5}\"") | ||
} | ||
compressName?.let { | ||
s.append(",\"compressName\":\"${compressName}\"") | ||
} | ||
return s.append('}').toString() | ||
} | ||
override fun toString(): String = Gson().toJson(this) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
load-assets-7z/src/main/java/com/imf/so/assets/load/NeedDownloadSoListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters