Files
FridaBox/Bcore/build.gradle
T
dependabot[bot]andGitHub 16f51cf1d5 build(deps): bump androidx.appcompat:appcompat to 1.7.1 (#15)
Update AppCompat dependencies after a successful Android CI run.
2026-07-28 19:21:03 +03:30

120 lines
3.3 KiB
Groovy

apply plugin: 'com.android.library'
def fridaBoxNdkProjectDir = System.getenv('FRIDABOX_NDK_PROJECT_DIR') ?: project.projectDir.absolutePath
if (System.getenv('FRIDABOX_NDK_PROJECT_DIR')) {
layout.buildDirectory.set(file("${fridaBoxNdkProjectDir}/build"))
}
android {
namespace 'top.niunaijun.blackbox'
compileSdk rootProject.ext.compileSdkVersion
ndkVersion = "29.0.14206865"
aidlPackagedList "android/app/IServiceConnection.aidl"
aidlPackagedList "android/app/IBinderSession.aidl"
aidlPackagedList "android/accounts/IAccountManagerResponse.aidl"
buildFeatures {
aidl true
}
buildFeatures {
prefab true
}
defaultConfig {
minSdkVersion rootProject.ext.minSdk
consumerProguardFiles "consumer-rules.pro"
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
ndkBuild {
path file("${fridaBoxNdkProjectDir}/src/main/cpp/Android.mk")
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:-deprecation" << "-Xlint:-unchecked" << "-Xlint:-rawtypes"
options.fork = true
options.forkOptions.jvmArgs << "-Xmx2048m"
}
testOptions {
unitTests.returnDefaultValues = true
}
packagingOptions {
jniLibs {
useLegacyPackaging true
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
warningsAsErrors false
disable "UnusedResources", 'RestrictedApi'
textOutput "stdout"
textReport false
checkOnly 'NewApi', 'InlinedApi'
}
}
// Strip the AIDL-generated "Using: ..." comment line which contains backslash sequences
// that Java's compiler mis-parses as Unicode escapes on Windows paths.
tasks.matching { it.name.startsWith('compileReleaseJavaWithJavac') || it.name.startsWith('compileDebugJavaWithJavac') }.all {
doFirst {
def aidlOut = file("$buildDir/generated/aidl_source_output_dir")
if (aidlOut.exists()) {
aidlOut.eachFileRecurse { f ->
if (f.name.endsWith('.java')) {
def content = f.text
if (content.contains(' * Using:')) {
content = content.replaceAll(/(?m)^ \* Using:.*$/, '')
f.text = content
}
}
}
}
}
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])
implementation 'com.google.android.material:material:1.3.0'
implementation(project(":black-reflection"))
annotationProcessor(project(":compiler"))
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
implementation 'com.github.tiann:FreeReflection:3.2.2'
testImplementation libs.junit
}