blob: 4ab7d1cf89672de3957ba112edf2ecbf455f3a8a [file] [log] [blame]
/*
* SPDX-FileCopyrightText: 2023-2024 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/
import org.lineageos.generatebp.GenerateBpPlugin
import org.lineageos.generatebp.GenerateBpPluginExtension
import org.lineageos.generatebp.models.Module
plugins {
id("com.android.application")
id("kotlin-android")
}
apply {
plugin<GenerateBpPlugin>()
}
buildscript {
repositories {
maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.9/.m2")
}
dependencies {
classpath("org.lineageos:gradle-generatebp:+")
}
}
android {
compileSdk = 34
namespace = "org.lineageos.glimpse"
defaultConfig {
applicationId = "org.lineageos.glimpse"
minSdk = 30
targetSdk = 34
versionCode = 1
versionName = "1.0"
}
buildTypes {
getByName("release") {
// Enables code shrinking, obfuscation, and optimization.
isMinifyEnabled = true
// Enables resource shrinking.
isShrinkResources = true
// Includes the default ProGuard rules files.
setProguardFiles(
listOf(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
)
}
getByName("debug") {
// Append .dev to package name so we won't conflict with AOSP build.
applicationIdSuffix = ".dev"
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
lint {
lintConfig = file("lint.xml")
}
}
dependencies {
// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.10"))
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.preference:preference:1.2.1")
implementation("com.google.android.material:material:1.9.0")
// EXIF
implementation("androidx.exifinterface:exifinterface:1.3.7")
// Media3
implementation("androidx.media3:media3-exoplayer:1.2.1")
implementation("androidx.media3:media3-exoplayer-dash:1.2.1")
implementation("androidx.media3:media3-exoplayer-hls:1.2.1")
implementation("androidx.media3:media3-exoplayer-rtsp:1.2.1")
implementation("androidx.media3:media3-exoplayer-smoothstreaming:1.2.1")
implementation("androidx.media3:media3-ui:1.2.1")
// Navigation
implementation("androidx.navigation:navigation-fragment-ktx:2.7.6")
implementation("androidx.navigation:navigation-ui-ktx:2.7.6")
// Recyclerview
implementation("androidx.recyclerview:recyclerview:1.3.2")
implementation("androidx.recyclerview:recyclerview-selection:1.1.0")
// Coil
implementation("io.coil-kt:coil:2.5.0")
implementation("io.coil-kt:coil-gif:2.5.0")
implementation("io.coil-kt:coil-video:2.5.0")
// ZoomImage
implementation("io.github.panpf.zoomimage:zoomimage-view-coil:1.0.2")
}
configure<GenerateBpPluginExtension> {
targetSdk.set(android.defaultConfig.targetSdk!!)
availableInAOSP.set { module: Module ->
when {
module.group.startsWith("androidx") -> {
// We provide our own androidx.media3
!module.group.startsWith("androidx.media3")
}
module.group.startsWith("org.jetbrains") -> true
module.group == "com.google.auto.value" -> true
module.group == "com.google.guava" -> true
module.group == "junit" -> true
else -> false
}
}
}