Skip to content

Commit

Permalink
**[FEAT][UI][REFACTOR] Enhanced Console UI, Added Layouts, Fixed Bugs…
Browse files Browse the repository at this point in the history
…, and Updated Dependencies**

**Features:**

* Added complete version of new ConsoleView.kt.
* Added TwoPane Layout in Console.
* Added layouts for different screen sizes and window sizes (large, medium).
* Added blur transformation for artwork in Console for MiniLayout.
* Updated the UI of the speed controller in Console.

**UI Updates:**

* Redesigned navbar in Home.kt.
* Provided two layouts for all screen sizes in VideoLandscape & VideoPortrait formats.
* Replaced the accent color with a new one.
* Added `isAppearanceLightSystemBars` in Home.kt to handle system-bar colors.

**Bug Fixes:**

* Fixed various issues in Console.kt, including:
    - Player view weird animation when closing
    - Color of system bars
    - Unintended touches
    - Restoration of system-bar colors when closing
* Fixed issues with system-bar colors.

**Refactoring:**

* Refactored PlayingQueue from dialog package to Console package.

**Dependency and Build Changes:**

* Updated dependencies:
    - WavySlider in Compose: 0.0.5
    - Media3: 1.2.1
    - Compose compiler: 1.5.7
    - Other dependencies to latest versions
* Properly moved libs toml.
* Added proguard-rules.pro for removing logs from the app code.
  • Loading branch information
iZakirSheikh authored and Zakir Sheikh committed Jan 20, 2024
1 parent a92a3d7 commit 371357d
Show file tree
Hide file tree
Showing 30 changed files with 3,726 additions and 2,253 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build, Sign, Upload, and Release Workflow
on:
push:
branches: # Change this to master once everything is setup.
- 'master'
- 'beta'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

140 changes: 49 additions & 91 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
@file:SuppressLint("UseTomlInstead")

import android.annotation.SuppressLint

plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.firebase)
alias(libs.plugins.hilt)
alias(libs.plugins.crashanlytics)
Expand Down Expand Up @@ -32,8 +28,8 @@ android {
applicationId = "com.prime.player"
minSdk = 21
targetSdk = 34
versionCode = 71
versionName = "2.7.9"
versionCode = 74
versionName = "2.8.0-beta03"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables { useSupportLibrary = true }
//Load secrets into BuildConfig
Expand All @@ -47,7 +43,6 @@ android {
// Make sure release is version is optimised.
release {
isMinifyEnabled = true
isZipAlignEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
Expand All @@ -69,100 +64,63 @@ android {
}
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn", "-Xcontext-receivers")
freeCompilerArgs = listOf(
"-Xopt-in=kotlin.RequiresOptIn",
"-Xcontext-receivers",
"-Xopt-in=com.primex.core.ExperimentalToolkitApi"
)
}
buildFeatures { compose = true }
composeOptions { kotlinCompilerExtensionVersion = "1.5.6" }
composeOptions { kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get() }
packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" } }
}

// Not moving these to libs.version.toml because i think this is redundant.
dependencies {
implementation("androidx.core:core-ktx:1.12.0")
// FixMe: Downgrading compose due to crashes in constraint layout within lazy list.
// This temporary solution addresses the issue until a more robust fix is implemented.
val compose_version = "1.6.0-beta03"
implementation("androidx.compose.ui:ui:$compose_version")
implementation("androidx.compose.ui:ui-tooling-preview:$compose_version")
implementation("androidx.compose.animation:animation-graphics:$compose_version")
implementation("androidx.compose.material:material:$compose_version")
// Integration with activities
implementation("androidx.activity:activity-compose:1.8.2")
// Material design icons
implementation("androidx.compose.material:material-icons-core:$compose_version")
implementation("androidx.compose.material:material-icons-extended:$compose_version")
// The Accompanist Libraries
implementation("io.coil-kt:coil-compose:2.5.0")
implementation("com.google.accompanist:accompanist-permissions:0.32.0")
//Lottie
implementation("com.airbnb.android:lottie-compose:6.2.0")
// Preferences and other widgets
val toolkit_version = "1.1.1"
implementation("com.github.prime-zs.toolkit:preferences:$toolkit_version")
implementation("com.github.prime-zs.toolkit:core-ktx:$toolkit_version")
implementation("com.github.prime-zs.toolkit:material2:$toolkit_version")
// Splash Screen API
implementation("androidx.core:core-splashscreen:1.0.1")
// Firebase
implementation(platform("com.google.firebase:firebase-bom:32.5.0"))
implementation("com.google.firebase:firebase-analytics-ktx")
implementation("com.google.firebase:firebase-crashlytics-ktx")
// WindowSizeClasses
implementation("androidx.compose.material3:material3-window-size-class:1.1.2")
// Google Play InAppUpdate
val in_app_update_version = "2.1.0"
implementation("com.google.android.play:app-update:$in_app_update_version")
implementation("com.google.android.play:app-update-ktx:$in_app_update_version")
// Google Play InAppReview
val in_app_review = "2.0.1"
implementation("com.google.android.play:review:$in_app_review")
implementation("com.google.android.play:review-ktx:$in_app_review")
// Google play in-app billing
val billing_version = "6.1.0"
implementation("com.android.billingclient:billing:$billing_version")
implementation("com.android.billingclient:billing-ktx:$billing_version")
// Unity Ads
implementation("com.unity3d.ads:unity-ads:4.9.2")
// Compose navigation
implementation("androidx.navigation:navigation-compose:2.7.6")
// Compose Downloadable fonts
implementation("androidx.compose.ui:ui-text-google-fonts:1.5.4")
// Hilt
val hilt_version = libs.versions.hilt.get()
implementation("com.google.dagger:hilt-android:${hilt_version}")
kapt("com.google.dagger:hilt-android-compiler:$hilt_version")
implementation("androidx.hilt:hilt-navigation-compose:1.1.0")
// Room Database
val room_version = "2.6.1"
implementation("androidx.room:room-runtime:$room_version")
kapt("androidx.room:room-compiler:$room_version")
implementation("androidx.room:room-ktx:$room_version")
//Ken Burns
// FixMe: Build Compose alternative; check compose marque modifier.
implementation("com.flaviofaria:kenburnsview:1.0.7")
//Wavy Slider
implementation("ir.mahozad.multiplatform:wavy-slider:0.3.0")
// Constraint Layout
// TODO: In future versions of the app, consider removing ConstraintLayout as it is still
// unstable in the release version. Besides, the cost of designing the app with it is too
// high and difficult.
implementation("androidx.constraintlayout:constraintlayout-compose:1.0.1")
val media3_version = "1.2.0"
// For media playback using ExoPlayer
implementation("androidx.media3:media3-exoplayer:$media3_version")
// For exposing and controlling media sessions
implementation("androidx.media3:media3-session:$media3_version")
// For building media playback UIs
implementation ("androidx.media3:media3-ui:$media3_version")
//Tag Editor
// Currently it only supports mp3;
implementation("com.mpatric:mp3agic:0.9.1")
implementation(libs.compose.ui)
implementation(libs.ui.tooling.preview)
implementation(libs.compose.animation.graphics)
implementation(libs.compose.material)
implementation(libs.ui.tooling)
implementation(libs.compose.activity)
implementation(libs.material.icons.core)
implementation(libs.material.icons.extended)
implementation(libs.coil)
implementation(libs.accompanist.permissions)
implementation(libs.accompanist.adaptive)
implementation(libs.lottie)
implementation(libs.toolkit.preferences)
implementation(libs.toolkit.core.ktx)
implementation(libs.toolkit.material2)
implementation(libs.splashscreen)
implementation(libs.firebase.analytics.ktx)
implementation(libs.firebase.crashlytics.ktx)
implementation(libs.window)
implementation(libs.play.app.update.ktx)
implementation(libs.play.app.review.ktx)
implementation(libs.google.billing.ktx)
implementation(libs.unity.ads)
implementation(libs.navigation.compose)
implementation(libs.ui.text.google.fonts)
implementation(libs.hilt.android)
kapt(libs.hilt.android.compiler)
implementation(libs.hilt.navigation.compose)
implementation(libs.room.runtime)
kapt(libs.room.compiler)
implementation(libs.room.ktx)
implementation(libs.kenburnsview)
implementation(libs.wavy.slider)
implementation(libs.constraint.layout)
implementation(libs.media3.exoplayer)
implementation(libs.media3.session)
implementation(libs.media3.ui)
implementation(libs.mp3agic)
}

// TODO: It appears that Material3 components may be leaking into this project, which is intended to support Material2.
// Please investigate if this issue is related to the Wavy Slider and resolve it. Once the main issue is fixed,
// consider removing this block of code.
configurations{
configurations {
all {
exclude(group = "androidx.compose.material3", module = "material3")
}
Expand Down
12 changes: 11 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,14 @@ LineNumberTable, *Annotation*, EnclosingMethod
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken

##---------------End: proguard configuration for Gson ----------
-keep class androidx.media3.** { *; }
-keep class androidx.media3.** { *; }

## Remove the logs
-assumenosideeffects class android.util.Log {
public static boolean isLoggable(java.lang.String, int);
public static int v(...);
public static int i(...);
public static int w(...);
public static int d(...);
# public static int e(...);
}
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<activity
android:name=".MainActivity"
android:exported="true"
android:configChanges="orientation|screenSize|screenLayout"
android:launchMode="singleTask">

<!--Activity's Intent Filter-->
Expand Down

0 comments on commit 371357d

Please sign in to comment.