Skip to content

Commit

Permalink
Feat search (#9)
Browse files Browse the repository at this point in the history
* shambles

* fixed service and view disparity

* updating track thumbnail draft

* update track thumbnail complete

* added wake lock permission

* delete action implemented

* content observer added to refresh after delete

* clean up

* ui update and refactor

* fix crash after delete android 10

* fix crash after delete android 10 update

* handle sharing track

* refactor menu actions

* handle setting track as ringtone

* fixed crash due to missing write system settings permission

* draft

* i can't remember what this change does

* lrc content retrieved successfully

* added loading animation and bottom sheet content alpha

* motion scene update

* motion scene update

* handle http error when getting lyrics

* update?

* update gradle

* updates

* some refactoring

* make app build

* remove hilt annotation from app
  • Loading branch information
Rick-AB authored Dec 25, 2024
1 parent 33b9a8f commit 5a2d5d1
Show file tree
Hide file tree
Showing 120 changed files with 5,567 additions and 1,899 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

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

6 changes: 3 additions & 3 deletions .idea/gradle.xml

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

2 changes: 1 addition & 1 deletion .idea/misc.xml

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

115 changes: 0 additions & 115 deletions app/build.gradle

This file was deleted.

153 changes: 153 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrainsKotlinAndroid)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.ksp)
alias(libs.plugins.compose.compiler)
}

android {
namespace = "com.rickinc.decibels"
compileSdk = 35

defaultConfig {
applicationId = "com.rickinc.decibels"
minSdk = 26
targetSdk = 35
versionCode = 1
versionName = "1.0"

testInstrumentationRunner = "com.rickinc.decibels.CustomTestRunner"
vectorDrawables {
useSupportLibrary = true
}
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
}

}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

tasks.withType(KotlinCompile::class.java) {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
}

buildFeatures {
compose = true
buildConfig = true
}
// composeOptions {
// kotlinCompilerExtensionVersion = '1.4.0'
// }
testOptions.unitTests.all {
it.testLogging {
events = setOf(
TestLogEvent.PASSED,
TestLogEvent.FAILED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT,
TestLogEvent.STANDARD_ERROR
)
}
}

packaging {
resources {
excludes.add("/META-INF/{AL2.0,LGPL2.1}")
}
}
}

dependencies {

implementation(libs.core.ktx)
implementation(libs.activity.compose)
implementation(libs.compose.ui)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.material3)
implementation(libs.constraintlayout.compose)
implementation(libs.lifecycle.runtime.ktx)
implementation(libs.lifecycle.viewmodel.ktx)
implementation(libs.material)
implementation(libs.lifecycle.runtime.compose)
implementation(libs.google.material)

// accompanist
implementation(libs.accompanist.systemuicontroller)

// hilt
implementation(libs.hilt.android)
implementation(libs.hilt.navigation.compose)

// koin
implementation(libs.koin.core)
implementation(libs.koin.android)
implementation(libs.bundles.koin.compose)

implementation(libs.navigation.compose)

// timber
implementation(libs.timber)

// media3
implementation(libs.media3.exoplayer)
implementation(libs.media3.ui)
implementation(libs.media3.session)

// palette
implementation(libs.palette.ktx)

// preferences
implementation(libs.preference.ktx)

// room
implementation(libs.room.ktx)
implementation(libs.room.runtime)
ksp(libs.room.compiler)

// data store
implementation(libs.datastore)

// kotlin serialization
implementation(libs.kotlinx.serialization.json)

// gson
implementation(libs.converter.gson)

// Moshi
implementation(libs.moshi.kotlin)

// jsoup
implementation(libs.jsoup)

// retrofit
implementation(libs.retrofit)
implementation(libs.retrofit2.converter.moshi)

// lottie
implementation(libs.lottie.compose)

testImplementation(libs.junit)
testImplementation(libs.coroutine.test)
androidTestImplementation(libs.ext.junit)
androidTestImplementation(libs.espresso.core)
androidTestImplementation(libs.ui.test.junit4)
androidTestImplementation(libs.hilt.android.testing)
debugImplementation(libs.ui.tooling)
debugImplementation(libs.ui.test.manifest)
}
2 changes: 1 addition & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
package com.rickinc.decibels.data.repository

import android.content.Context
import com.rickinc.decibels.domain.exception.ErrorHolder
import com.rickinc.decibels.domain.model.NowPlaying
import com.rickinc.decibels.domain.model.Result
import com.rickinc.decibels.domain.repository.AudioRepository
import com.rickinc.decibels.domain.model.Track
import kotlinx.coroutines.flow.Flow

class TestAudioRepository : AudioRepository {
var shouldThrowException: Boolean = false
override suspend fun getAudioFiles(): Result<List<Track>> {
return if (shouldThrowException) Result.Error("Error reading audio files")
return if (shouldThrowException) Result.Error(ErrorHolder.Local("Error reading audio files"))
else Result.Success(Track.getUniqueTrackList())
}

override suspend fun updateNowPlaying(nowPlaying: NowPlaying) {
TODO("Not yet implemented")
}

override fun getNowPlayingFlow(): Flow<NowPlaying?> {
TODO("Not yet implemented")
}

override fun deleteTrack(context: Context, track: Track) {
TODO("Not yet implemented")
}

override suspend fun getLyricsForTrack(context: Context, track: Track): Result<String> {
TODO("Not yet implemented")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class NowPlayingRenderTest {

private val track = Track.getSingleTrack()
private val uiState = NowPlayingState.TrackLoaded(
currentTrack = track,
track = track,
isPlaying = false,
repeatMode = 0,
isShuffleActive = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import com.rickinc.decibels.R
import com.rickinc.decibels.domain.model.Track
import com.rickinc.decibels.presentation.nowplaying.NowPlayingScreen
import com.rickinc.decibels.presentation.nowplaying.NowPlayingState
import com.rickinc.decibels.presentation.ui.theme.LocalController
import com.rickinc.decibels.presentation.theme.LocalController
import com.rickinc.decibels.presentation.util.formatTrackDuration

fun launchNowPlayingScreen(
Expand Down
Loading

0 comments on commit 5a2d5d1

Please # to comment.