6.6.3 - Alpha5 - 修复 Gradle 构建脚本可能因获取到无效库档案文件长度而导致构建失败的问题 (issue #389)

This commit is contained in:
SuperMonster003
2025-05-18 20:23:16 +08:00
parent 676dde9632
commit 4c7ba32646
4 changed files with 33 additions and 15 deletions

View File

@@ -21,7 +21,8 @@
"使用 JavaAdapter 时导致 ClassLoader 调用栈溢出的问题 _[`issue #376`](http://issues.autojs6.com/376)_",
"console.setContentTextColor 方法导致日志字体颜色丢失默认值的问题 _[`issue #346`](http://issues.autojs6.com/346)_",
"console.setContentBackgroundColor 方法无法接受颜色名称参数的问题 _[`issue #384`](http://issues.autojs6.com/384)_",
"README.md 中部分语言日期格式不正确的问题"
"README.md 中部分语言日期格式不正确的问题",
"Gradle 构建脚本可能因获取到无效库档案文件长度而导致构建失败的问题 _[`issue #389`](http://issues.autojs6.com/389)_"
],
"improvement": [
"布局分析支持控件隐藏 (by [TonyJiangWJ](https://github.com/TonyJiangWJ)) _[`pr #371`](http://pr.autojs6.com/371)_ _[`issue #355`](http://issues.autojs6.com/355)_",

View File

@@ -393,6 +393,7 @@ class Utils {
final int MAX_RETRIES = 3
int attempt = 0
boolean success = false
boolean shouldPrintProgress = project.ext["platform"]["shouldPrintProgress"] == true
while (attempt < MAX_RETRIES && !success) {
try {
@@ -411,22 +412,34 @@ class Utils {
long downloadedSize = 0
int bytesRead
if (shouldPrintProgress && fileSize <= 0) {
println "\rDownloading..."
}
while ((bytesRead = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead)
downloadedSize += bytesRead
if (project.ext["platform"]["shouldPrintProgress"] == true) {
double progress = (downloadedSize * 100.0 / fileSize)
String progressBar = generateProgressBar(progress)
print String.format("\rDownloading... [ %s ] %.2f%%", progressBar, progress)
System.out.flush()
if (shouldPrintProgress && fileSize > 0) {
try {
double progress = (downloadedSize * 100.0 / fileSize)
String progressBar = generateProgressBar(progress)
print String.format("\rDownloading... [ %s ] %.2f%%", progressBar, progress)
System.out.flush()
} catch (Exception ignored) {
/* Ignored. */
}
}
}
}
}
String downloadPath = cacheFile.absolutePath
String formattedFileSize = formatFileSize(fileSize)
print String.format("\rDownload complete [ %s | %s ]\n", downloadPath, formattedFileSize)
if (fileSize > 0) {
String formattedFileSize = formatFileSize(fileSize)
print String.format("\rDownload complete [ %s | %s ]\n", downloadPath, formattedFileSize)
} else {
print String.format("\rDownload complete [ %s ]\n", downloadPath)
}
System.out.flush()
println()
@@ -445,6 +458,8 @@ class Utils {
}
private void handleZip() {
def shouldPrintProgress = project.ext["platform"]["shouldPrintProgress"] == true
def zipFileForTotalSize = new ZipFile(cacheFile)
def zipEntriesForTotalSize = zipFileForTotalSize.entries()
def entries = []
@@ -490,7 +505,7 @@ class Utils {
}
}
if (project.ext["platform"]["shouldPrintProgress"] == true) {
if (shouldPrintProgress) {
double progress = (processedEntries * 100.0 / totalEntries)
String progressBar = generateProgressBar(progress)
print String.format("\rExtracting... [ %s ] %.2f%%", progressBar, progress)
@@ -515,6 +530,8 @@ class Utils {
}
private void handleSevenZip() {
def shouldPrintProgress = project.ext["platform"]["shouldPrintProgress"] == true
def sevenZFileForTotalSize = new SevenZFile.Builder().setFile(cacheFile).get()
def entry
def entries = []
@@ -557,7 +574,7 @@ class Utils {
}
}
if (project.ext["platform"]["shouldPrintProgress"] == true) {
if (shouldPrintProgress) {
double progress = (processedEntries * 100.0 / totalEntries)
String progressBar = generateProgressBar(progress)
print String.format("\rExtracting... [ %s ] %.2f%%", progressBar, progress)

View File

@@ -204,8 +204,8 @@ pluginManagement {
/* Print concerned info by `System.getProperties()`. */
val isShowConcernedSystemProperties = true
val isCleanupPaddleOcr = false
val isCleanupRapidOcr = false
val isCleanupPaddleOcr = true
val isCleanupRapidOcr = true
val fallbackAgpVersion = "7.4.2"
val fallbackKotlinVersion = "1.7.10"

View File

@@ -1,5 +1,5 @@
#Sun May 18 11:47:57 CST 2025
BUILD_TIME=1747540077602
#Sun May 18 20:20:48 CST 2025
BUILD_TIME=1747570848298
COMPILE_SDK_VERSION=35
IMAGE_QUANT_CMAKE_VERSION=3.22.1
IMAGE_QUANT_NDK_VERSION=26.1.10909125
@@ -19,6 +19,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13
RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3
TARGET_SDK_VERSION=35
TARGET_SDK_VERSION_INRT=29
VERSION_BUILD=3233
VERSION_BUILD=3234
VERSION_NAME=6.6.3 Alpha5
VSCODE_EXT_REQUIRED_VERSION=1.0.8