2022-09-22 18:47:46 +02:00
|
|
|
plugins {
|
2024-02-20 03:48:36 +01:00
|
|
|
alias(libs.plugins.android.application)
|
|
|
|
alias(libs.plugins.kotlin)
|
2024-02-22 06:13:17 +01:00
|
|
|
publishing
|
2024-07-15 00:37:37 +02:00
|
|
|
signing
|
2022-09-22 18:47:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
namespace = "app.revanced.integrations"
|
2024-02-20 03:48:36 +01:00
|
|
|
compileSdk = 33
|
|
|
|
|
|
|
|
applicationVariants.all {
|
|
|
|
outputs.all {
|
|
|
|
this as com.android.build.gradle.internal.api.ApkVariantOutputImpl
|
|
|
|
|
|
|
|
outputFileName = "${rootProject.name}-$versionName.apk"
|
|
|
|
}
|
|
|
|
}
|
2022-09-22 18:47:46 +02:00
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId = "app.revanced.integrations"
|
|
|
|
minSdk = 23
|
2022-10-11 15:47:14 +02:00
|
|
|
targetSdk = 33
|
2022-09-22 18:47:46 +02:00
|
|
|
multiDexEnabled = false
|
2024-02-22 06:13:17 +01:00
|
|
|
versionName = version as String
|
2022-09-22 18:47:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
2022-09-26 16:28:55 +02:00
|
|
|
isMinifyEnabled = true
|
2023-01-02 02:50:32 +01:00
|
|
|
proguardFiles(
|
|
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
2024-02-20 03:48:36 +01:00
|
|
|
"proguard-rules.pro",
|
2023-01-02 02:50:32 +01:00
|
|
|
)
|
|
|
|
}
|
2022-09-22 18:47:46 +02:00
|
|
|
}
|
2024-02-20 03:48:36 +01:00
|
|
|
|
2022-09-22 18:47:46 +02:00
|
|
|
compileOptions {
|
2024-02-20 03:48:36 +01:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
|
|
targetCompatibility = JavaVersion.VERSION_11
|
2022-09-22 18:47:46 +02:00
|
|
|
}
|
2024-02-20 03:48:36 +01:00
|
|
|
|
2022-09-22 18:47:46 +02:00
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = JavaVersion.VERSION_11.toString()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-02-20 03:48:36 +01:00
|
|
|
compileOnly(libs.appcompat)
|
|
|
|
compileOnly(libs.annotation)
|
|
|
|
compileOnly(libs.okhttp)
|
|
|
|
compileOnly(libs.retrofit)
|
|
|
|
|
|
|
|
compileOnly(project(":stub"))
|
2022-09-22 18:47:46 +02:00
|
|
|
}
|
2023-01-05 22:18:24 +01:00
|
|
|
|
2024-07-15 00:37:37 +02:00
|
|
|
|
2024-02-20 03:48:36 +01:00
|
|
|
tasks {
|
2024-07-15 00:37:37 +02:00
|
|
|
val assembleReleaseSignApk by registering {
|
|
|
|
dependsOn("assembleRelease")
|
2024-02-22 06:13:17 +01:00
|
|
|
|
2024-07-15 00:37:37 +02:00
|
|
|
val apk = layout.buildDirectory.file("outputs/apk/release/${rootProject.name}-$version.apk")
|
2024-02-22 06:13:17 +01:00
|
|
|
|
2024-07-15 00:37:37 +02: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
|
|
|
|
2024-07-15 00:37:37 +02: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.
|
2024-07-15 00:37:37 +02:00
|
|
|
// Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435.
|
2024-02-22 06:13:17 +01:00
|
|
|
publish {
|
2024-07-15 00:37:37 +02:00
|
|
|
dependsOn(assembleReleaseSignApk)
|
2024-02-20 03:48:36 +01:00
|
|
|
}
|
|
|
|
}
|