- 源码 316 文件收编为 rusto-rs/ 文件夹,随本仓库管理 - 移除内部 .git(补丁已存档 docs/rusto-rs-metal-patch-20260912.patch,上游可随时 re-clone) - target/ 与 docs/.yarn 缓存不入库;本地改动:ROCR_* 环境变量调优 + Metal 链接修复 + 预处理测试脚本
93 lines
2.5 KiB
Groovy
93 lines
2.5 KiB
Groovy
plugins {
|
|
id 'com.android.library' version '8.2.0'
|
|
id 'org.jetbrains.kotlin.android' version '1.9.20'
|
|
id 'com.vanniktech.maven.publish' version '0.28.0'
|
|
}
|
|
|
|
android {
|
|
namespace 'com.byrizki.rusto'
|
|
compileSdk 34
|
|
|
|
defaultConfig {
|
|
minSdk 21
|
|
targetSdk 34
|
|
versionCode 1
|
|
versionName "0.2.5"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
consumerProguardFiles "consumer-rules.pro"
|
|
|
|
ndk {
|
|
// Multi-arch support: ARMv7, ARM64, x86, x86_64
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
// Android apps on RN 0.70 use D8 from AGP 7.x. Java 11 keeps published
|
|
// Kotlin bytecode below class-file 56 and avoids D8 sealed-class failure.
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = '11'
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
// Prebuilt native libraries location
|
|
jniLibs.srcDirs = ['src/main/jniLibs']
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.20'
|
|
implementation 'androidx.core:core-ktx:1.12.0'
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
|
|
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
}
|
|
|
|
mavenPublishing {
|
|
|
|
coordinates('com.github.byrizki.rusto-rs', 'rusto-android', '0.2.5')
|
|
|
|
pom {
|
|
name = 'RustO! Android'
|
|
description = 'RustO! - Pure Rust OCR library for Android'
|
|
url = 'https://github.com/byrizki/rusto-rs'
|
|
|
|
licenses {
|
|
license {
|
|
name = 'MIT License'
|
|
url = 'https://opensource.org/licenses/MIT'
|
|
}
|
|
}
|
|
|
|
developers {
|
|
developer {
|
|
id = 'rusto'
|
|
name = 'RustO Contributors'
|
|
}
|
|
}
|
|
|
|
scm {
|
|
connection = 'scm:git:git://github.com/byrizki/rusto-rs.git'
|
|
developerConnection = 'scm:git:ssh://github.com/byrizki/rusto-rs.git'
|
|
url = 'https://github.com/byrizki/rusto-rs'
|
|
}
|
|
}
|
|
}
|
|
|