blob: a059cc7258c86670eff77a6592b603eea332aa79 [file] [log] [blame]
/*
* SPDX-FileCopyrightText: 2023 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.3/.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"
}
}
dependencies {
// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
implementation("androidx.core:core-ktx:1.10.1")
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.6")
// Media3
implementation("androidx.media3:media3-exoplayer:1.1.1")
implementation("androidx.media3:media3-exoplayer-dash:1.1.1")
implementation("androidx.media3:media3-exoplayer-hls:1.1.1")
implementation("androidx.media3:media3-exoplayer-rtsp:1.1.1")
implementation("androidx.media3:media3-exoplayer-smoothstreaming:1.1.1")
implementation("androidx.media3:media3-ui:1.1.1")
// Navigation
implementation("androidx.navigation:navigation-fragment-ktx:2.6.0")
implementation("androidx.navigation:navigation-ui-ktx:2.6.0")
// okhttp
implementation("com.squareup.okhttp3:okhttp:4.10.0")
// Coil
implementation("io.coil-kt:coil:2.2.2")
implementation("io.coil-kt:coil-gif:2.2.2")
implementation("io.coil-kt:coil-video:2.2.2")
}
configure<GenerateBpPluginExtension> {
targetSdk.set(android.defaultConfig.targetSdk!!)
availableInAOSP.set { module: Module ->
when {
module.group.startsWith("androidx") -> {
// We provide our own androidx.media3 & lifecycle-common
!module.group.startsWith("androidx.media3") &&
module.name != "lifecycle-common"
}
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
}
}
}