6.7.0 - Alpha6 - Gradle 构建脚本转换 (Groovy -> Kotlin DSL)

This commit is contained in:
SuperMonster003
2025-09-30 22:30:06 +08:00
parent 834cde26ea
commit 4fe314d301
23 changed files with 609 additions and 573 deletions

View File

@@ -165,10 +165,11 @@ public class ProjectConfig {
})
private List<String> mFeatures = new ArrayList<>();
@SerializedName("excludedDirs")
@SerializedName("excludeDirs")
@SerializedNameCompatible(with = {
@With(value = "ignoredDirs", target = {"AutoJs4", "AutoX"}),
@With(value = "ignore", target = {"Unknown"}),
@With(value = "excludedDirs"),
})
private final List<String> mExcludedDirs = new ArrayList<>();

View File

@@ -1,79 +0,0 @@
plugins {
id 'org.autojs.build.utils'
id 'org.autojs.build.properties'
id 'org.autojs.build.jvm-convention'
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
ext {
projectName = "Image Quantization"
}
def versionMap = [
"libimagequant": "2.17.0",
"libpng" : "1.6.49",
"MIN_SDK" : props["MIN_SDK"] as Integer,
"COMPILE_SDK" : props["COMPILE_SDK"] as Integer,
"TARGET_SDK" : props["TARGET_SDK"] as Integer,
"NDK" : props["IMAGE_QUANT/NDK"],
"CMAKE" : props["IMAGE_QUANT/CMAKE"],
]
def nameMap = [
"PROJECT": ext["projectName"],
"NDK" : "NDK",
"CMAKE" : "Cmake",
]
utils.configureLibraryLifecycleHooks(project, nameMap.PROJECT, [
"libimagequant",
"libpng",
"NDK",
"CMAKE",
].collect { "${nameMap[it] ?: it}: ${versionMap[it]}" }, Collections.emptyList(), null, [".cxx"])
android {
namespace = "org.pngquant"
ndkVersion versionMap.NDK
compileSdk versionMap.COMPILE_SDK
defaultConfig {
minSdk versionMap.MIN_SDK
targetSdk versionMap.TARGET_SDK
externalNativeBuild {
cmake {
cppFlags "-std=c++17"
// @Hint by SuperMonster003 on Aug 28, 2025.
// ! Moved into `target_link_libraries(pngquant_bridge ...)` in `CMakeLists.txt`.
// ! zh-CN: 移至 `CMakeLists.txt` 文件 `target_link_libraries(pngquant_bridge ...)` 代码中.
// # cFlags "-ljnigraphics"
}
}
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
version versionMap.CMAKE
}
}
}

View File

@@ -0,0 +1,86 @@
plugins {
id("org.autojs.build.utils")
id("org.autojs.build.properties")
id("org.autojs.build.jvm-convention")
id("com.android.library")
id("org.jetbrains.kotlin.android")
}
ext {
set("projectName", "Image Quantization")
}
val versionMap = mapOf(
"libimagequant" to "2.17.0",
"libpng" to "1.6.49",
"MIN_SDK" to props["MIN_SDK"].toInt(),
"COMPILE_SDK" to props["COMPILE_SDK"].toInt(),
"TARGET_SDK" to props["TARGET_SDK"].toInt(),
"NDK" to props["IMAGE_QUANT/NDK"],
"CMAKE" to props["IMAGE_QUANT/CMAKE"],
)
val nameMap = mapOf(
"PROJECT" to extensions.extraProperties.get("projectName") as String,
"NDK" to "NDK",
"CMAKE" to "Cmake",
)
utils.configureLibraryLifecycleHooks(
project,
nameMap["PROJECT"] as String,
listOf("libimagequant", "libpng", "NDK", "CMAKE").map { "${nameMap[it] ?: it}: ${versionMap[it]}" },
emptyList(),
null,
listOf(".cxx"),
)
android {
namespace = "org.pngquant"
ndkVersion = versionMap["NDK"] as String
compileSdk = versionMap["COMPILE_SDK"] as Int
defaultConfig {
minSdk = versionMap["MIN_SDK"] as Int
externalNativeBuild {
cmake {
cppFlags += "-std=c++17"
// @Hint by SuperMonster003 on Aug 28, 2025.
// ! Moved into `target_link_libraries(pngquant_bridge ...)` in `CMakeLists.txt`.
// ! zh-CN: 移至 `CMakeLists.txt` 文件 `target_link_libraries(pngquant_bridge ...)` 代码中.
// # cFlags "-ljnigraphics"
}
}
ndk {
abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
}
lint {
targetSdk = versionMap["TARGET_SDK"] as Int
}
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
externalNativeBuild {
cmake {
path = file("CMakeLists.txt")
version = versionMap["CMAKE"] as String
}
}
}

View File

@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

View File

@@ -1,147 +0,0 @@
/**
* Paddle OCR (https://github.com/PaddlePaddle/PaddleOCR) build script (Groovy).
*
* Created by TonyJiangWJ (https://github.com/TonyJiangWJ) on Aug 7, 2023.
* Modified by TonyJiangWJ (https://github.com/TonyJiangWJ) as of Aug 11, 2023.
* Modified by SuperMonster003 as of Sep 4, 2023.
*/
plugins {
id 'org.autojs.build.utils'
id 'org.autojs.build.properties'
id 'org.autojs.build.jvm-convention'
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
ext {
projectName = "Paddle OCR"
}
def versionMap = [
"MIN_SDK" : props["MIN_SDK"] as Integer,
"COMPILE_SDK": props["COMPILE_SDK"] as Integer,
"TARGET_SDK" : props["TARGET_SDK"] as Integer,
"NDK" : props["PADDLE_OCR/NDK"],
"CMAKE" : props["PADDLE_OCR/CMAKE"],
"OPENCV" : props["PADDLE_OCR/OPENCV"],
]
def nameMap = [
"PROJECT": ext["projectName"],
"OPENCV" : "OpenCV",
"NDK" : "NDK",
"CMAKE" : "Cmake",
]
def libsToDeploy = [
// @Hint by TonyJiangWJ (https://github.com/TonyJiangWJ) on Aug 7, 2023.
// ! 下载 OpenCV 源码包 (默认为 4.2.0).
// ! 和 Auto.js 中的版本 (如 4.8.0) 不匹配会产生冲突,
// ! 可按需修改 version.properties 中对应内容.
// ! en-US (translated by SuperMonster003 on Oct 22, 2024):
// ! Download the archive for source code of OpenCV (defaults to 4.2.0).
// ! Not matching the version in Auto.js (e.g., 4.8.0) will cause conflicts.
// ! Adjust the corresponding content in version.properties as needed.
utils.newLibDeployer(project, nameMap.OPENCV, "https://github.com/opencv/opencv/releases/download" +
"/${versionMap.OPENCV}/opencv-${versionMap.OPENCV}-android-sdk.zip")
.setSourceDir("/OpenCV-android-sdk/sdk/native/")
.setDestDir("/src/sdk/native/")
]
utils.configureLibraryLifecycleHooks(project, nameMap.PROJECT, [
"OPENCV",
"NDK",
"CMAKE",
].collect { "${nameMap[it]}: ${versionMap[it]}" }, libsToDeploy, "isCleanupPaddleOcr", [".cxx"])
android {
namespace = "com.baidu.paddle.lite.ocr"
ndkVersion versionMap.NDK
compileSdk versionMap.COMPILE_SDK
defaultConfig {
minSdk versionMap.MIN_SDK
targetSdk versionMap.TARGET_SDK
externalNativeBuild {
cmake {
cppFlags(([
"-std": "c++11",
].collect { "$it.key=$it.value" } + [
"-f": ["rtti", "exceptions"],
"-W": "no-format",
].collect {
it.value instanceof List
? it.value.collect { opt -> (it.key + opt) }.join("\u0020")
: it.key + it.value
}).join("\u0020"))
arguments(*[
// @Hint by LZX284 (https://github.com/LZX284) on Sep 30, 2023.
// ! "ANDROID_PLATFORM" 默认为 "android-23", 这里修改为与 AutoJs6 最低 SDK 版本一致的 `versionMap.MIN_SDK`.
// ! en-US (translated by SuperMonster003 on Oct 22, 2024):
// ! "ANDROID_PLATFORM" with default value "android-23" was changed to `versionMap.MIN_SDK`
// ! to align with the min SDK version of AutoJs6.
ANDROID_PLATFORM: "android-${versionMap.MIN_SDK}",
ANDROID_STL : "c++_shared",
ANDROID_ARM_NEON: "TRUE",
].collect {
// @Hint by SuperMonster003 on Nov 12, 2023.
// ! Do not add a space (nbsp) after "-D".
// ! Reference: https://stackoverflow.com/questions/14887438/spacing-in-d-option-in-cmake
// ! zh-CN:
// ! 在 "-D" 后不要添加空格 (不间断空格).
// ! 参阅: https://stackoverflow.com/questions/14887438/spacing-in-d-option-in-cmake
"-D$it.key=$it.value"
})
}
}
ndk {
// @Hint by SuperMonster003 on Jan 2, 2024.
// ! Supported architectures: armv7, armv8.
// ! References:
// ! https://github.com/PaddlePaddle/Paddle-Lite/blob/develop/lite/tools/build_android.sh#L7
// ! https://github.com/PaddlePaddle/Paddle-Lite/issues/80
// ! zh-CN:
// ! 支持的架构: armv7, armv8.
// ! 参阅:
// ! https://github.com/PaddlePaddle/Paddle-Lite/blob/develop/lite/tools/build_android.sh#L7
// ! https://github.com/PaddlePaddle/Paddle-Lite/issues/80
// noinspection ChromeOsAbiSupport
abiFilters "arm64-v8a", "armeabi-v7a"
ldLibs "jnigraphics"
}
}
buildTypes {
release {
minifyEnabled false
}
debug {
minifyEnabled false
}
}
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
version versionMap.CMAKE
}
}
}
dependencies {
implementation fileTree(include: ["*.jar"], dir: "libs")
implementation project(path: ":libs:org.opencv-${versionMap.OPENCV}")
implementation libs.core.ktx
implementation libs.preference.ktx
}

View File

@@ -0,0 +1,169 @@
/**
* Paddle OCR (https://github.com/PaddlePaddle/PaddleOCR) build script (Kotlin DSL).
*
* Created by TonyJiangWJ (https://github.com/TonyJiangWJ) on Aug 7, 2023.
* Modified by TonyJiangWJ (https://github.com/TonyJiangWJ) as of Aug 11, 2023.
* Modified by SuperMonster003 as of Sep 4, 2023.
* Transformed by SuperMonster003 on Sep 30, 2025.
*/
plugins {
id("org.autojs.build.utils")
id("org.autojs.build.properties")
id("org.autojs.build.jvm-convention")
id("com.android.library")
id("org.jetbrains.kotlin.android")
}
ext {
set("projectName", "Paddle OCR")
}
val versionMap = mapOf(
"MIN_SDK" to props["MIN_SDK"].toInt(),
"COMPILE_SDK" to props["COMPILE_SDK"].toInt(),
"TARGET_SDK" to props["TARGET_SDK"].toInt(),
"NDK" to props["PADDLE_OCR/NDK"],
"CMAKE" to props["PADDLE_OCR/CMAKE"],
"OPENCV" to props["PADDLE_OCR/OPENCV"],
)
val nameMap = mapOf(
"PROJECT" to extensions.extraProperties.get("projectName") as String,
"OPENCV" to "OpenCV",
"NDK" to "NDK",
"CMAKE" to "Cmake",
)
val libsToDeploy = listOf(
// @Hint by TonyJiangWJ (https://github.com/TonyJiangWJ) on Aug 7, 2023.
// ! 下载 OpenCV 源码包 (默认为 4.2.0).
// ! 和 Auto.js 中的版本 (如 4.8.0) 不匹配会产生冲突,
// ! 可按需修改 version.properties 中对应内容.
// ! en-US (translated by SuperMonster003 on Oct 22, 2024):
// ! Download the archive for source code of OpenCV (defaults to 4.2.0).
// ! Not matching the version in Auto.js (e.g., 4.8.0) will cause conflicts.
// ! Adjust the corresponding content in version.properties as needed.
utils.newLibDeployer(
project,
nameMap["OPENCV"] as String,
"https://github.com/opencv/opencv/releases/download/${versionMap["OPENCV"]}/opencv-${versionMap["OPENCV"]}-android-sdk.zip",
).apply {
setSourceDir("/OpenCV-android-sdk/sdk/native/")
setDestDir("/src/sdk/native/")
}
)
val argsMap = mapOf(
// @Hint by LZX284 (https://github.com/LZX284) on Sep 30, 2023.
// ! "ANDROID_PLATFORM" 默认为 "android-23", 这里修改为与 AutoJs6 最低 SDK 版本一致的 `versionMap.MIN_SDK`.
// ! en-US (translated by SuperMonster003 on Oct 22, 2024):
// ! "ANDROID_PLATFORM" with default value "android-23" was changed to `versionMap.MIN_SDK`
// ! to align with the min SDK version of AutoJs6.
"ANDROID_PLATFORM" to "android-${versionMap["MIN_SDK"]}",
"ANDROID_STL" to "c++_shared",
"ANDROID_ARM_NEON" to "TRUE",
)
// @Hint by SuperMonster003 on Nov 12, 2023.
// ! Do not add a space (nbsp) after "-D".
// ! Reference: https://stackoverflow.com/questions/14887438/spacing-in-d-option-in-cmake
// ! zh-CN:
// ! 在 "-D" 后不要添加空格 (不间断空格).
// ! 参阅: https://stackoverflow.com/questions/14887438/spacing-in-d-option-in-cmake
val args = argsMap.entries.map { (k, v) -> "-D$k=$v" }
utils.configureLibraryLifecycleHooks(
project,
nameMap["PROJECT"] as String,
listOf("OPENCV", "NDK", "CMAKE").map { "${nameMap[it]}: ${versionMap[it]}" },
libsToDeploy,
"isCleanupPaddleOcr",
listOf(".cxx")
)
android {
namespace = "com.baidu.paddle.lite.ocr"
ndkVersion = versionMap["NDK"] as String
compileSdk = versionMap["COMPILE_SDK"] as Int
defaultConfig {
minSdk = versionMap["MIN_SDK"] as Int
externalNativeBuild {
cmake {
val cppFlagsMap = mapOf(
"-std" to "c++11"
)
val cppListFlags = mapOf(
"-f" to listOf("rtti", "exceptions"),
"-W" to "no-format"
)
// 组装等价于 Groovy 脚本中的拼接逻辑
val cppFlagsJoined = buildString {
append(
cppFlagsMap.entries.joinToString(" ") { (k, v) -> "$k=$v" }
)
append(" ")
append(
cppListFlags.entries.joinToString(" ") { (k, v) ->
when (v) {
is List<*> -> v.joinToString(" ") { opt -> k + opt }
else -> "$k$v"
}
}
)
}.trim()
cppFlags += cppFlagsJoined
arguments += args
}
}
ndk {
// @Hint by SuperMonster003 on Jan 2, 2024.
// ! Supported architectures: arm-v7, arm-v8.
// ! References:
// ! https://github.com/PaddlePaddle/Paddle-Lite/blob/develop/lite/tools/build_android.sh#L7
// ! https://github.com/PaddlePaddle/Paddle-Lite/issues/80
// ! zh-CN:
// ! 支持的架构: arm-v7, arm-v8.
// ! 参阅:
// ! https://github.com/PaddlePaddle/Paddle-Lite/blob/develop/lite/tools/build_android.sh#L7
// ! https://github.com/PaddlePaddle/Paddle-Lite/issues/80
// noinspection ChromeOsAbiSupport
abiFilters += listOf("arm64-v8a", "armeabi-v7a")
@Suppress("DEPRECATION")
ldLibs?.add("jnigraphics")
}
}
buildTypes {
release {
isMinifyEnabled = false
}
debug {
isMinifyEnabled = false
}
}
externalNativeBuild {
cmake {
path = file("src/main/cpp/CMakeLists.txt")
version = versionMap["CMAKE"] as String
}
}
lint {
targetSdk = versionMap["TARGET_SDK"] as Int
}
}
dependencies {
implementation(fileTree(mapOf("include" to listOf("*.jar"), "dir" to "libs")))
implementation(project(mapOf("path" to ":libs:org.opencv-${versionMap["OPENCV"]}")))
implementation(libs.core.ktx)
implementation(libs.preference.ktx)
}

View File

@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

View File

@@ -1,121 +0,0 @@
/**
* Rapid OCR (https://github.com/RapidAI/RapidOCR) build script (Groovy).
*
* Created by SuperMonster003 on Sep 19, 2024.
*/
plugins {
id 'org.autojs.build.utils'
id 'org.autojs.build.properties'
id 'org.autojs.build.jvm-convention'
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'kotlin-parcelize'
}
ext["projectName"] = "Rapid OCR"
def versionMap = [
"OFFICIAL_NAME" : "1.3.0", /* From original build.gradle file. */
"MIN_SDK" : props["MIN_SDK"] as Integer,
"COMPILE_SDK" : props["COMPILE_SDK"] as Integer,
"TARGET_SDK" : props["TARGET_SDK"] as Integer,
"NDK" : props["RAPID_OCR/NDK"],
"CMAKE" : props["RAPID_OCR/CMAKE"],
"OPENCV_MOBILE" : props["RAPID_OCR/OPENCV_MOBILE"],
"OPENCV_MOBILE_LABEL": props["RAPID_OCR/OPENCV_MOBILE_LABEL"],
"ONNX" : props["RAPID_OCR/ONNX"],
"ONNX_RUNTIME" : props["RAPID_OCR/ONNX_RUNTIME"],
]
def nameMap = [
"PROJECT" : ext["projectName"],
"OPENCV_MOBILE" : "OpenCV Mobile",
"OPENCV_MOBILE_LABEL": "OpenCV Mobile Label",
"ONNX" : "Onnx",
"ONNX_RUNTIME" : "Onnx Runtime",
"NDK" : "NDK",
"CMAKE" : "Cmake",
]
def libsToDeploy = [
utils.newLibDeployer(project, nameMap.OPENCV_MOBILE, "https://github.com/nihui/opencv-mobile/releases/download" +
"/v${versionMap.OPENCV_MOBILE_LABEL}/opencv-mobile-${versionMap.OPENCV_MOBILE}-android.zip")
.setSourceDir("/opencv-mobile-${versionMap.OPENCV_MOBILE}-android/sdk/native/")
.setDestDir("/src/sdk/native/"),
utils.newLibDeployer(project, nameMap.ONNX, "https://github.com/RapidAI/RapidOcrOnnx/releases/download" +
"/${versionMap.ONNX}/Project_RapidOcrOnnx-${versionMap.ONNX}.7z")
.setSourceDir("/Project_RapidOcrOnnx-${versionMap.ONNX}/models/")
.setDestDir("/src/main/assets/models/"),
utils.newLibDeployer(project, nameMap.ONNX_RUNTIME, "https://github.com/RapidAI/OnnxruntimeBuilder/releases/download" +
"/${versionMap.ONNX_RUNTIME}/onnxruntime-${versionMap.ONNX_RUNTIME}-android-shared.7z")
.setSourceDir("/onnxruntime-shared/")
.setDestDir("/src/main/onnxruntime-shared/"),
]
utils.configureLibraryLifecycleHooks(project, nameMap.PROJECT, [
"OPENCV_MOBILE",
"OPENCV_MOBILE_LABEL",
"ONNX",
"ONNX_RUNTIME",
"NDK",
"CMAKE",
].collect { "${nameMap[it]}: ${versionMap[it]}" }, libsToDeploy, "isCleanupRapidOcr", [".cxx"])
android {
namespace = "com.benjaminwan.ocrlibrary"
ndkVersion versionMap.NDK
compileSdk versionMap.COMPILE_SDK
defaultConfig {
minSdk versionMap.MIN_SDK
targetSdk versionMap.TARGET_SDK
versionName versionMap.OFFICIAL_NAME
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
externalNativeBuild {
cmake {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64', 'x86'
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
version versionMap.CMAKE
}
}
libraryVariants.all {
variant ->
variant.outputs.all {
outputFileName = "${project.name}-${defaultConfig.versionName}-${variant.buildType.name}.aar"
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
testImplementation libs.junit
androidTestImplementation libs.test.ext.junit
androidTestImplementation libs.test.espresso.core
implementation libs.core.ktx
implementation libs.appcompat
}

View File

@@ -0,0 +1,133 @@
/**
* Rapid OCR (https://github.com/RapidAI/RapidOCR) build script (Kotlin DSL).
*
* Created by SuperMonster003 on Sep 19, 2024.
* Transformed by SuperMonster003 on Sep 30, 2025.
*/
plugins {
id("org.autojs.build.utils")
id("org.autojs.build.properties")
id("org.autojs.build.jvm-convention")
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("kotlin-parcelize")
}
ext {
set("projectName", "Rapid OCR")
}
val versionMap = mapOf(
"OFFICIAL_NAME" to "1.3.0", /* From original build.gradle file. */
"MIN_SDK" to props["MIN_SDK"].toInt(),
"COMPILE_SDK" to props["COMPILE_SDK"].toInt(),
"TARGET_SDK" to props["TARGET_SDK"].toInt(),
"NDK" to props["RAPID_OCR/NDK"],
"CMAKE" to props["RAPID_OCR/CMAKE"],
"OPENCV_MOBILE" to props["RAPID_OCR/OPENCV_MOBILE"],
"OPENCV_MOBILE_LABEL" to props["RAPID_OCR/OPENCV_MOBILE_LABEL"],
"ONNX" to props["RAPID_OCR/ONNX"],
"ONNX_RUNTIME" to props["RAPID_OCR/ONNX_RUNTIME"],
)
val nameMap = mapOf(
"PROJECT" to extensions.extraProperties["projectName"] as String,
"OPENCV_MOBILE" to "OpenCV Mobile",
"OPENCV_MOBILE_LABEL" to "OpenCV Mobile Label",
"ONNX" to "Onnx",
"ONNX_RUNTIME" to "Onnx Runtime",
"NDK" to "NDK",
"CMAKE" to "Cmake",
)
val libsToDeploy = listOf(
utils.newLibDeployer(
project,
nameMap["OPENCV_MOBILE"] as String,
"https://github.com/nihui/opencv-mobile/releases/download/v${versionMap["OPENCV_MOBILE_LABEL"]}/opencv-mobile-${versionMap["OPENCV_MOBILE"]}-android.zip",
).apply {
setSourceDir("/opencv-mobile-${versionMap["OPENCV_MOBILE"]}-android/sdk/native/")
setDestDir("/src/sdk/native/")
},
utils.newLibDeployer(
project,
nameMap["ONNX"] as String,
"https://github.com/RapidAI/RapidOcrOnnx/releases/download/${versionMap["ONNX"]}/Project_RapidOcrOnnx-${versionMap["ONNX"]}.7z",
).apply {
setSourceDir("/Project_RapidOcrOnnx-${versionMap["ONNX"]}/models/")
setDestDir("/src/main/assets/models/")
},
utils.newLibDeployer(
project,
nameMap["ONNX_RUNTIME"] as String,
"https://github.com/RapidAI/OnnxruntimeBuilder/releases/download/${versionMap["ONNX_RUNTIME"]}/onnxruntime-${versionMap["ONNX_RUNTIME"]}-android-shared.7z",
).apply {
setSourceDir("/onnxruntime-shared/")
setDestDir("/src/main/onnxruntime-shared/")
},
)
utils.configureLibraryLifecycleHooks(
project,
nameMap["PROJECT"] as String,
listOf("OPENCV_MOBILE", "OPENCV_MOBILE_LABEL", "ONNX", "ONNX_RUNTIME", "NDK", "CMAKE")
.map { "${nameMap[it] ?: it}: ${versionMap[it]}" },
libsToDeploy,
"isCleanupRapidOcr",
listOf(".cxx"),
)
android {
namespace = "com.benjaminwan.ocrlibrary"
version = versionMap["OFFICIAL_NAME"] as String
ndkVersion = versionMap["NDK"] as String
compileSdk = versionMap["COMPILE_SDK"] as Int
defaultConfig {
minSdk = versionMap["MIN_SDK"] as Int
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
externalNativeBuild {
cmake {
abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86_64", "x86")
}
}
}
lint {
targetSdk = versionMap["TARGET_SDK"] as Int
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
externalNativeBuild {
cmake {
path = file("src/main/cpp/CMakeLists.txt")
version = versionMap["CMAKE"] as String
}
}
}
dependencies {
implementation(fileTree(mapOf("include" to listOf("*.jar"), "dir" to "libs")))
testImplementation(libs.junit)
androidTestImplementation(libs.test.ext.junit)
androidTestImplementation(libs.test.espresso.core)
implementation(libs.core.ktx)
implementation(libs.appcompat)
}

View File

@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

View File

@@ -1,27 +0,0 @@
plugins {
id 'org.autojs.build.versions'
id 'org.autojs.build.jvm-convention'
id 'com.android.library'
id 'kotlin-android'
}
android {
namespace 'net.dongliu.apk.parser'
compileSdk = versions.sdkVersionCompile
defaultConfig {
minSdk = versions.sdkVersionMin
targetSdk = versions.sdkVersionTarget
versionName '6'
consumerProguardFiles "consumer-rules.pro"
multiDexEnabled true
}
}
dependencies {
implementation libs.bcprov.jdk15on
implementation libs.bcpkix.jdk15on
implementation libs.annotation
}

View File

@@ -0,0 +1,28 @@
plugins {
id("org.autojs.build.versions")
id("org.autojs.build.jvm-convention")
id("com.android.library")
id("kotlin-android")
}
android {
namespace = "net.dongliu.apk.parser"
version = "6"
compileSdk = versions.sdkVersionCompile
defaultConfig {
minSdk = versions.sdkVersionMin
consumerProguardFiles("consumer-rules.pro")
multiDexEnabled = true
}
lint {
targetSdk = versions.sdkVersionTarget
}
}
dependencies {
implementation(libs.bcprov.jdk15on)
implementation(libs.bcpkix.jdk15on)
implementation(libs.annotation)
}

View File

@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

View File

@@ -1,29 +1,29 @@
plugins {
id 'org.autojs.build.versions'
id 'org.autojs.build.jvm-convention'
id 'com.android.library'
id 'kotlin-android'
id("org.autojs.build.versions")
id("org.autojs.build.jvm-convention")
id("com.android.library")
id("kotlin-android")
}
android {
namespace = 'com.mcal.apksigner'
namespace = "com.mcal.apksigner"
version = "1.1-template (11)"
compileSdk = versions.sdkVersionCompile
defaultConfig {
minSdk = versions.sdkVersionMin
targetSdk = versions.sdkVersionTarget
versionName '1.1-template'
versionCode 11
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets {
main {
java.srcDirs = ['src/main/java']
getByName("main") {
java.srcDirs("src/main/java")
}
}
lint {
targetSdk = versions.sdkVersionTarget
}
}
repositories {
@@ -32,8 +32,8 @@ repositories {
}
dependencies {
implementation libs.appcompat
implementation libs.material
implementation(libs.appcompat)
implementation(libs.material)
// @Hint by SuperMonster003 on Mar 14, 2025.
// ! Dependency "prov" contains "core" (zh-CN: 依赖 "prov" 已包含 "core"):
@@ -43,7 +43,7 @@ dependencies {
// # implementation("com.madgag.spongycastle:core:1.58.0.0")
implementation(libs.prov)
testImplementation libs.junit
androidTestImplementation libs.test.ext.junit
androidTestImplementation libs.test.espresso.core
testImplementation(libs.junit)
androidTestImplementation(libs.test.ext.junit)
androidTestImplementation(libs.test.espresso.core)
}

View File

@@ -1,35 +0,0 @@
plugins {
id 'org.autojs.build.versions'
id 'org.autojs.build.jvm-convention'
id 'com.android.library'
id 'kotlin-android'
}
android {
namespace = 'com.jaredrummler.android.colorpicker'
compileSdk = versions.sdkVersionCompile
resourcePrefix "cpv_"
defaultConfig {
minSdk = versions.sdkVersionMin
targetSdk = versions.sdkVersionTarget
versionName '1.1.0'
}
lintOptions {
abortOnError false
}
}
repositories {
mavenCentral()
google()
}
dependencies {
implementation libs.appcompat
implementation libs.preference.ktx
}

View File

@@ -0,0 +1,33 @@
plugins {
id("org.autojs.build.versions")
id("org.autojs.build.jvm-convention")
id("com.android.library")
id("kotlin-android")
}
android {
namespace = "com.jaredrummler.android.colorpicker"
version = "1.1.0"
resourcePrefix = "cpv_"
compileSdk = versions.sdkVersionCompile
defaultConfig {
minSdk = versions.sdkVersionMin
}
lint {
targetSdk = versions.sdkVersionTarget
abortOnError = false
}
}
repositories {
mavenCentral()
google()
}
dependencies {
implementation(libs.appcompat)
implementation(libs.preference.ktx)
}

View File

@@ -1,49 +0,0 @@
plugins {
id 'org.autojs.build.versions'
id 'org.autojs.build.jvm-convention'
id 'com.android.library'
id 'kotlin-android'
}
android {
namespace = 'com.huaban.jieba'
compileSdk = versions.sdkVersionCompile
defaultConfig {
minSdk = versions.sdkVersionMin
targetSdk = versions.sdkVersionTarget
group = 'com.huaban'
versionName = '1.0.3-SNAPSHOT (Optimized for AutoJs6)'
description = '结巴分词工具(jieba for java)'
testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner'
}
sourceSets {
main {
// 主 Java/Kotlin 目录
java.srcDirs = ['src/main/java']
// 将资源文件夹指定为 assets 目录
assets.srcDirs = ['src/main/assets']
}
}
}
repositories {
mavenCentral()
google()
}
dependencies {
implementation libs.appcompat
implementation libs.commons.lang3
testImplementation libs.junit
androidTestImplementation libs.test.ext.junit
androidTestImplementation libs.test.espresso.core
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}

View File

@@ -0,0 +1,51 @@
plugins {
id("org.autojs.build.versions")
id("org.autojs.build.jvm-convention")
id("com.android.library")
id("kotlin-android")
}
android {
group = "com.huaban"
namespace = "com.huaban.jieba"
version = "1.0.3-SNAPSHOT [Optimized for AutoJs6]"
description = "结巴分词工具 (jieba for java)"
compileSdk = versions.sdkVersionCompile
defaultConfig {
minSdk = versions.sdkVersionMin
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets {
named("main") {
// 主 Java/Kotlin 目录
java.setSrcDirs(listOf("src/main/java"))
// 将资源文件夹指定为 assets 目录
assets.setSrcDirs(listOf("src/main/assets"))
}
}
lint {
targetSdk = versions.sdkVersionTarget
}
}
repositories {
mavenCentral()
google()
}
dependencies {
implementation(libs.appcompat)
implementation(libs.commons.lang3)
testImplementation(libs.junit)
androidTestImplementation(libs.test.ext.junit)
androidTestImplementation(libs.test.espresso.core)
}
tasks.withType(JavaCompile::class.java).configureEach {
options.encoding = "UTF-8"
}

View File

@@ -1,50 +0,0 @@
plugins {
id 'org.autojs.build.versions'
id 'org.autojs.build.jvm-convention'
id 'com.android.library'
id 'kotlin-android'
}
android {
namespace = 'com.wdullaer.materialdatetimepicker'
compileSdk = versions.sdkVersionCompile
defaultConfig {
minSdk = versions.sdkVersionMin
targetSdk = versions.sdkVersionTarget
versionName '4.2.3'
versionCode 54
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
}
}
lintOptions {
abortOnError false
}
}
repositories {
mavenCentral()
google()
}
dependencies {
implementation libs.appcompat
implementation libs.recyclerview
testImplementation libs.junit
testImplementation libs.junit.quickcheck.core
testImplementation libs.junit.quickcheck.generators
androidTestImplementation libs.test.ext.junit
androidTestImplementation libs.test.runner
androidTestImplementation libs.test.rules
}

View File

@@ -0,0 +1,46 @@
plugins {
id("org.autojs.build.versions")
id("org.autojs.build.jvm-convention")
id("com.android.library")
id("kotlin-android")
}
android {
namespace = "com.wdullaer.materialdatetimepicker"
version = "4.2.3 (54)"
compileSdk = versions.sdkVersionCompile
defaultConfig {
minSdk = versions.sdkVersionMin
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
}
}
lint {
targetSdk = versions.sdkVersionTarget
abortOnError = false
}
}
repositories {
mavenCentral()
google()
}
dependencies {
implementation(libs.appcompat)
implementation(libs.recyclerview)
testImplementation(libs.junit)
testImplementation(libs.junit.quickcheck.core)
testImplementation(libs.junit.quickcheck.generators)
androidTestImplementation(libs.test.ext.junit)
androidTestImplementation(libs.test.runner)
androidTestImplementation(libs.test.rules)
}

View File

@@ -1,39 +0,0 @@
plugins {
id 'org.autojs.build.versions'
id 'org.autojs.build.jvm-convention'
id 'com.android.library'
id 'kotlin-android'
}
android {
namespace = 'com.afollestad.materialdialogs'
compileSdk = versions.sdkVersionCompile
defaultConfig {
minSdk = versions.sdkVersionMin
targetSdk = versions.sdkVersionTarget
versionName '0.9.6.0'
versionCode 179
consumerProguardFiles 'progress-proguard.txt'
}
lintOptions {
abortOnError false
}
}
repositories {
mavenCentral()
google()
}
dependencies {
implementation libs.appcompat.v7
implementation libs.support.annotations
implementation libs.recyclerview.v7
implementation libs.materialprogressbar
}

View File

@@ -0,0 +1,36 @@
plugins {
id("org.autojs.build.versions")
id("org.autojs.build.jvm-convention")
id("com.android.library")
id("kotlin-android")
}
android {
namespace = "com.afollestad.materialdialogs"
version = "0.9.6.0 (179)"
compileSdk = versions.sdkVersionCompile
defaultConfig {
minSdk = versions.sdkVersionMin
consumerProguardFiles("progress-proguard.txt")
}
lint {
targetSdk = versions.sdkVersionTarget
abortOnError = false
}
}
repositories {
mavenCentral()
google()
}
dependencies {
implementation(libs.appcompat.v7)
implementation(libs.support.annotations)
implementation(libs.recyclerview.v7)
implementation(libs.materialprogressbar)
}

View File

@@ -1,5 +1,5 @@
#Sun Sep 28 23:19:46 CST 2025
BUILD_TIME=1759072786473
#Tue Sep 30 20:27:00 CST 2025
BUILD_TIME=1759235220922
COMPILE_SDK_VERSION=36
IMAGE_QUANT_CMAKE_VERSION=3.22.1
IMAGE_QUANT_NDK_VERSION=26.1.10909125
@@ -23,6 +23,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13
RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3
TARGET_SDK_VERSION=36
TARGET_SDK_VERSION_INRT=29
VERSION_BUILD=3387
VERSION_BUILD=3389
VERSION_NAME=6.7.0 Alpha6
VSCODE_EXT_REQUIRED_VERSION=1.0.8