init
This commit is contained in:
91
android/build.gradle.kts
Normal file
91
android/build.gradle.kts
Normal file
@@ -0,0 +1,91 @@
|
||||
group = "com.xiarui.printer"
|
||||
version = "1.0"
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:8.11.1")
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
flatDir {
|
||||
dirs("libs")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.xiarui.printer"
|
||||
|
||||
compileSdk = 36
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdk = 24
|
||||
ndk {
|
||||
abiFilters += listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
|
||||
}
|
||||
}
|
||||
|
||||
packaging {
|
||||
jniLibs {
|
||||
pickFirsts += listOf(
|
||||
"lib/arm64-v8a/libjnidispatch.so",
|
||||
"lib/armeabi-v7a/libjnidispatch.so",
|
||||
"lib/x86/libjnidispatch.so",
|
||||
"lib/x86_64/libjnidispatch.so"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests.all {
|
||||
it.outputs.upToDateWhen { false }
|
||||
|
||||
it.testLogging {
|
||||
events("passed", "skipped", "failed", "standardOut", "standardError")
|
||||
showStandardStreams = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.mockito:mockito-core:5.0.0")
|
||||
implementation(files("libs/autoreplyprint.aar"))
|
||||
}
|
||||
|
||||
// Skip AAR bundling — local .aar dependency prevents bundle* tasks from succeeding.
|
||||
// The AAR is available at runtime via flatDir repo; intermediate outputs are sufficient.
|
||||
tasks.whenTaskAdded {
|
||||
if (name.startsWith("bundleDebugAar") || name.startsWith("bundleReleaseAar")) {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user