PlayIntegrityFix/app/build.gradle.kts

68 lines
1.9 KiB
Plaintext
Raw Normal View History

2023-11-20 01:42:21 +02:00
plugins {
id("com.android.application")
}
android {
namespace = "es.chiteroman.playintegrityfix"
compileSdk = 34
ndkVersion = "26.1.10909125"
buildToolsVersion = "34.0.0"
defaultConfig {
applicationId = "es.chiteroman.playintegrityfix"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "1.0"
externalNativeBuild {
2023-11-26 11:51:22 +02:00
ndk {
jobs = Runtime.getRuntime().availableProcessors()
abiFilters += "armeabi-v7a"
abiFilters += "arm64-v8a"
2023-11-20 01:42:21 +02:00
}
}
}
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
externalNativeBuild {
2023-11-26 11:51:22 +02:00
ndkBuild {
path = file("src/main/cpp/Android.mk")
2023-11-20 01:42:21 +02:00
}
}
2023-11-27 13:37:26 +02:00
}
afterEvaluate {
val moduleFolder = project.rootDir.resolve("module")
val dexFile = project.buildDir.resolve("intermediates/dex/release/minifyReleaseWithR8/classes.dex")
val soDir = project.buildDir.resolve("intermediates/stripped_native_libs/release/out/lib")
dexFile.copyTo(moduleFolder.resolve("classes.dex"), overwrite = true)
soDir.walk().filter { it.isFile && it.extension == "so" }.forEach { soFile ->
val abiFolder = soFile.parentFile.name
val destination = moduleFolder.resolve("zygisk/$abiFolder.so")
soFile.copyTo(destination, overwrite = true)
}
tasks["assembleRelease"].dependsOn("module")
}
tasks.register<Zip>("module") {
archiveFileName.set("PlayIntegrityFix.zip")
destinationDirectory.set(project.rootDir.resolve("out"))
from(project.rootDir.resolve("module"))
2023-11-20 01:42:21 +02:00
}