Skip to content

Commit

Permalink
Glimpse: The great catchup
Browse files Browse the repository at this point in the history
- Update Gradle wrapper to 8.11.1
- Update Kotlin to 1.9.23
- Sync build files from Twelve
- Sync dependencies versions with Gradle
  - Move from coil to coil3
- Move to Gradle version catalog
- Reformat code

Change-Id: I1f87058db9475971178ffb938206df36f55af5d9
  • Loading branch information
SebaUbuntu committed Nov 28, 2024
1 parent 8e169fd commit ac3edfd
Show file tree
Hide file tree
Showing 127 changed files with 584 additions and 165 deletions.
26 changes: 20 additions & 6 deletions app/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ android_app {

static_libs: [
// DO NOT EDIT THIS SECTION MANUALLY
"androidx.core_core-ktx",
"androidx.activity_activity",
"androidx.appcompat_appcompat",
"androidx-constraintlayout_constraintlayout",
"androidx.preference_preference",
"com.google.android.material_material",
"androidx.core_core-ktx",
"androidx.exifinterface_exifinterface",
"androidx.fragment_fragment-ktx",
"androidx.lifecycle_lifecycle-runtime",
"androidx.lifecycle_lifecycle-runtime-ktx",
"androidx.lifecycle_lifecycle-service",
"Glimpse_androidx.media3_media3-common-ktx",
"Glimpse_androidx.media3_media3-exoplayer",
"Glimpse_androidx.media3_media3-exoplayer-dash",
"Glimpse_androidx.media3_media3-exoplayer-hls",
Expand All @@ -49,12 +53,22 @@ android_app {
"Glimpse_androidx.media3_media3-ui",
"androidx.navigation_navigation-fragment-ktx",
"androidx.navigation_navigation-ui-ktx",
"androidx.preference_preference",
"androidx.recyclerview_recyclerview",
"androidx.recyclerview_recyclerview-selection",
"Glimpse_io.coil-kt_coil",
"Glimpse_io.coil-kt_coil-gif",
"Glimpse_io.coil-kt_coil-video",
"androidx.viewpager2_viewpager2",
"com.google.android.material_material",
"Glimpse_com.squareup.okhttp3_okhttp",
"Glimpse_io.coil-kt.coil3_coil",
"Glimpse_io.coil-kt.coil3_coil-android",
"Glimpse_io.coil-kt.coil3_coil-core-android",
"Glimpse_io.coil-kt.coil3_coil-gif",
"Glimpse_io.coil-kt.coil3_coil-network-core-android",
"Glimpse_io.coil-kt.coil3_coil-network-okhttp",
"Glimpse_io.coil-kt.coil3_coil-video",
"Glimpse_io.github.panpf.zoomimage_zoomimage-core-android",
"Glimpse_io.github.panpf.zoomimage_zoomimage-view-coil",
"kotlin-stdlib",
],

optimize: {
Expand Down
90 changes: 40 additions & 50 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import org.lineageos.generatebp.GenerateBpPluginExtension
import org.lineageos.generatebp.models.Module

plugins {
id("com.android.application")
id("kotlin-android")
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
}

apply {
Expand All @@ -18,7 +18,7 @@ apply {

buildscript {
repositories {
maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.9/.m2")
maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.15/.m2")
}

dependencies {
Expand All @@ -27,8 +27,8 @@ buildscript {
}

android {
compileSdk = 35
namespace = "org.lineageos.glimpse"
compileSdk = 35

defaultConfig {
applicationId = "org.lineageos.glimpse"
Expand All @@ -39,34 +39,32 @@ android {
}

buildTypes {
getByName("release") {
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"
)
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
getByName("debug") {

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
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "17"
}

lint {
Expand All @@ -75,41 +73,33 @@ android {
}

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")
implementation(libs.androidx.activity)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.exifinterface)
implementation(libs.androidx.fragment.ktx)
implementation(libs.androidx.lifecycle.service)
implementation(libs.androidx.media3.common.ktx)
implementation(libs.androidx.media3.exoplayer)
implementation(libs.androidx.media3.exoplayer.dash)
implementation(libs.androidx.media3.exoplayer.hls)
implementation(libs.androidx.media3.exoplayer.rtsp)
implementation(libs.androidx.media3.exoplayer.smoothstreaming)
implementation(libs.androidx.media3.ui)
implementation(libs.androidx.navigation.fragment.ktx)
implementation(libs.androidx.navigation.ui.ktx)
implementation(libs.androidx.preference)
implementation(libs.androidx.recyclerview)
implementation(libs.androidx.recyclerview.selection)
implementation(libs.androidx.viewpager2)
implementation(libs.coil)
implementation(libs.coil.gif)
implementation(libs.coil.network.okhttp)
implementation(libs.coil.video)
implementation(libs.material)
implementation(libs.okhttp)
implementation(libs.zoomimage.view.coil)
}

configure<GenerateBpPluginExtension> {
Expand Down
Loading

0 comments on commit ac3edfd

Please sign in to comment.