Skip to content

Commit

Permalink
new: jetfm reworked with material you and compose 1.1.0-beta03
Browse files Browse the repository at this point in the history
  • Loading branch information
pblinux committed Dec 11, 2021
0 parents commit cd0853f
Show file tree
Hide file tree
Showing 281 changed files with 5,164 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
app/src/main/java/tech/pixela/jetfm/utils/general/Constants.kt
3 changes: 3 additions & 0 deletions .idea/.gitignore

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

1 change: 1 addition & 0 deletions .idea/.name

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

6 changes: 6 additions & 0 deletions .idea/compiler.xml

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

20 changes: 20 additions & 0 deletions .idea/gradle.xml

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

23 changes: 23 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

32 changes: 32 additions & 0 deletions .idea/misc.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
103 changes: 103 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import tech.pixela.jetfm.Dependencies
import tech.pixela.jetfm.Versions

plugins {
id 'com.android.application'
id 'dagger.hilt.android.plugin'
id 'kotlin-kapt'
id 'kotlinx-serialization'
id 'org.jetbrains.kotlin.android'
}

android {
compileSdk 31

defaultConfig {
applicationId "tech.pixela.jetfm"
minSdk 22
targetSdk 31
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion Versions.Android.JetpackCompose.compose
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}

dependencies {
/* Kotlin */
implementation Dependencies.Kotlin.kotlinx_serialization_json
/* Android */
// Base
implementation Dependencies.Android.Base.androidx_core
implementation Dependencies.Android.Base.androidx_lifecycle
// Jetpack
implementation Dependencies.Android.Jetpack.data_store
implementation Dependencies.Android.Jetpack.hilt_android
implementation Dependencies.Android.Jetpack.paging
kapt Dependencies.Android.Jetpack.hilt_compiler
// Jetpack Compose
implementation Dependencies.Android.JetpackCompose.activity
implementation Dependencies.Android.JetpackCompose.hilt_navigation
implementation Dependencies.Android.JetpackCompose.material2
implementation Dependencies.Android.JetpackCompose.material3
implementation Dependencies.Android.JetpackCompose.navigation
implementation Dependencies.Android.JetpackCompose.paging
implementation Dependencies.Android.JetpackCompose.tooling_preview
implementation Dependencies.Android.JetpackCompose.ui
implementation Dependencies.Android.JetpackCompose.view_model
/* Third-party */
//Accompanist
implementation Dependencies.ThirdParty.Accompanist.flow_layout
implementation Dependencies.ThirdParty.Accompanist.insets
implementation Dependencies.ThirdParty.Accompanist.pager
implementation Dependencies.ThirdParty.Accompanist.pager_indicators
implementation Dependencies.ThirdParty.Accompanist.system_ui
implementation Dependencies.ThirdParty.Accompanist.swipe_refresh
// Chucker
debugImplementation Dependencies.ThirdParty.Chucker.chucker_debug
releaseImplementation Dependencies.ThirdParty.Chucker.chucker_release
// Coil
implementation Dependencies.ThirdParty.coil
// Material motion
implementation Dependencies.ThirdParty.MaterialMotion.core
implementation Dependencies.ThirdParty.MaterialMotion.navigation
// SquareUp
implementation Dependencies.ThirdParty.SquareUp.okhttp
implementation Dependencies.ThirdParty.SquareUp.retrofit
implementation Dependencies.ThirdParty.SquareUp.retrofit_kotlinx_serialization
/* Test and debug */
androidTestImplementation Dependencies.Android.JetpackCompose.Testing.ui_testing
androidTestImplementation Dependencies.Android.Testing.espresso_androidx
androidTestImplementation Dependencies.Android.Testing.junit_androidx
debugImplementation Dependencies.Android.JetpackCompose.Testing.ui_test_manifest
debugImplementation Dependencies.Android.JetpackCompose.Testing.ui_tooling
testImplementation Dependencies.Kotlin.Testing.junit
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Binary file added app/release/app-release.apk
Binary file not shown.
20 changes: 20 additions & 0 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "tech.pixela.jetfm",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package tech.pixela.jetfm

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("tech.pixela.jetfm", appContext.packageName)
}
}
36 changes: 36 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="tech.pixela.jetfm">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".JetApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_player_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_player_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Jetfm"
tools:targetApi="31">
<activity
android:name=".ui.activities.splash.SplashActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.activities.login.LoginActivity"
android:exported="false" />
<activity
android:name=".ui.activities.main.MainActivity"
android:theme="@style/Theme.Jetfm" />
</application>

</manifest>
Binary file added app/src/main/ic_player_launcher-playstore.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions app/src/main/java/tech/pixela/jetfm/JetApplication.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package tech.pixela.jetfm

import android.app.Application
import dagger.hilt.android.HiltAndroidApp

@HiltAndroidApp
class JetApplication : Application()
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package tech.pixela.jetfm.data.model.lastfm.base

import kotlinx.serialization.SerialName
import tech.pixela.jetfm.data.model.lastfm.common.Attributes
import tech.pixela.jetfm.data.model.lastfm.common.Image
import tech.pixela.jetfm.data.model.lastfm.common.InnerAlbumArtist
import kotlinx.serialization.Serializable

@Suppress("SpellCheckingInspection")
@Serializable
data class Album(
@SerialName("@attr") val attributes: Attributes? = null,
@SerialName("playcount") val playCount: Int,
val artist: InnerAlbumArtist,
val image: List<Image> = listOf(),
val mbid: String,
val name: String,
val url: String,
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package tech.pixela.jetfm.data.model.lastfm.base

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import tech.pixela.jetfm.data.model.lastfm.common.Attributes
import tech.pixela.jetfm.data.model.lastfm.common.Image

@Suppress("SpellCheckingInspection")
@Serializable
data class Artist(
@SerialName("@attr") val attributes: Attributes? = null,
@SerialName("playcount") val playCount: Int,
val image: List<Image> = listOf(),
val mbid: String,
val name: String,
val streamable: Int,
val url: String,
)

0 comments on commit cd0853f

Please sign in to comment.