FossifyGallery/app/build.gradle.kts

135 lines
3.9 KiB
Text
Raw Normal View History

2023-08-17 14:46:52 +02:00
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.konan.properties.Properties
2023-09-28 13:19:39 +02:00
import java.io.FileInputStream
2023-08-17 14:46:52 +02:00
plugins {
alias(libs.plugins.android)
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.ksp)
}
val keystorePropertiesFile: File = rootProject.file("keystore.properties")
val keystoreProperties = Properties()
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
android {
compileSdk = project.libs.versions.app.build.compileSDKVersion.get().toInt()
defaultConfig {
applicationId = libs.versions.app.version.appId.get()
minSdk = project.libs.versions.app.build.minimumSDK.get().toInt()
targetSdk = project.libs.versions.app.build.targetSDK.get().toInt()
versionName = project.libs.versions.app.version.versionName.get()
versionCode = project.libs.versions.app.version.versionCode.get().toInt()
setProperty("archivesBaseName", "gallery-$versionCode")
}
signingConfigs {
if (keystorePropertiesFile.exists()) {
register("release") {
keyAlias = keystoreProperties.getProperty("keyAlias")
keyPassword = keystoreProperties.getProperty("keyPassword")
storeFile = file(keystoreProperties.getProperty("storeFile"))
storePassword = keystoreProperties.getProperty("storePassword")
}
}
}
buildFeatures {
viewBinding = true
buildConfig = true
}
buildTypes {
debug {
applicationIdSuffix = ".debug"
2023-08-17 14:46:52 +02:00
}
release {
isMinifyEnabled = true
2024-01-10 20:57:55 +01:00
isShrinkResources = true
2023-08-17 14:46:52 +02:00
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
if (keystorePropertiesFile.exists()) {
signingConfig = signingConfigs.getByName("release")
}
}
}
flavorDimensions.add("licensing")
productFlavors {
register("foss")
register("prepaid")
}
sourceSets {
getByName("main").java.srcDirs("src/main/kotlin")
}
compileOptions {
2024-09-22 21:41:53 +02:00
val currentJavaVersionFromLibs = JavaVersion.valueOf(libs.versions.app.build.javaVersion.get())
2023-08-17 14:46:52 +02:00
sourceCompatibility = currentJavaVersionFromLibs
targetCompatibility = currentJavaVersionFromLibs
}
dependenciesInfo {
includeInApk = false
}
2023-08-17 14:46:52 +02:00
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = project.libs.versions.app.build.kotlinJVMTarget.get()
}
namespace = libs.versions.app.version.appId.get()
lint {
checkReleaseBuilds = false
abortOnError = false
}
packaging {
2023-08-17 14:46:52 +02:00
resources {
excludes += "META-INF/library_release.kotlin_module"
}
}
bundle {
language {
@Suppress("UnstableApiUsage")
enableSplit = false
}
}
2023-08-17 14:46:52 +02:00
}
dependencies {
implementation(libs.fossify.commons)
2023-08-17 14:46:52 +02:00
implementation(libs.android.image.cropper)
implementation(libs.exif)
implementation(libs.android.gif.drawable)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.media3.exoplayer)
implementation(libs.sanselan)
2024-09-22 21:41:53 +02:00
implementation(libs.androidphotofilters)
2023-08-17 14:46:52 +02:00
implementation(libs.androidsvg.aar)
implementation(libs.gestureviews)
implementation(libs.subsamplingscaleimageview)
implementation(libs.androidx.swiperefreshlayout)
implementation(libs.awebp)
implementation(libs.apng)
2024-03-06 20:50:31 +01:00
implementation(libs.avif.integration)
2023-08-17 14:46:52 +02:00
implementation(libs.okio)
implementation(libs.picasso) {
exclude(group = "com.squareup.okhttp3", module = "okhttp")
}
compileOnly(libs.okhttp)
ksp(libs.glide.compiler)
implementation(libs.zjupure.webpdecoder)
2023-08-17 14:46:52 +02:00
implementation(libs.bundles.room)
ksp(libs.androidx.room.compiler)
}