revanced-integrations/app/build.gradle.kts

81 lines
1.9 KiB
Plaintext
Raw Normal View History

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin)
2024-02-22 06:13:17 +01:00
publishing
signing
}
android {
namespace = "app.revanced.integrations"
compileSdk = 33
applicationVariants.all {
outputs.all {
this as com.android.build.gradle.internal.api.ApkVariantOutputImpl
outputFileName = "${rootProject.name}-$versionName.apk"
}
}
defaultConfig {
applicationId = "app.revanced.integrations"
minSdk = 23
2022-10-11 15:47:14 +02:00
targetSdk = 33
multiDexEnabled = false
2024-02-22 06:13:17 +01:00
versionName = version as String
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
dependencies {
compileOnly(libs.appcompat)
compileOnly(libs.annotation)
compileOnly(libs.okhttp)
compileOnly(libs.retrofit)
compileOnly(project(":stub"))
}
tasks {
val assembleReleaseSignApk by registering {
dependsOn("assembleRelease")
2024-02-22 06:13:17 +01:00
val apk = layout.buildDirectory.file("outputs/apk/release/${rootProject.name}-$version.apk")
2024-02-22 06:13:17 +01:00
inputs.file(apk).withPropertyName("input")
outputs.file(apk.map { it.asFile.resolveSibling("${it.asFile.name}.asc") })
2024-02-22 06:13:17 +01:00
doLast {
signing {
useGpgCmd()
sign(*inputs.files.files.toTypedArray())
}
2024-02-22 06:13:17 +01:00
}
}
2024-02-20 04:35:38 +01:00
// Needed by gradle-semantic-release-plugin.
// Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435.
2024-02-22 06:13:17 +01:00
publish {
dependsOn(assembleReleaseSignApk)
}
}