add all the pretty new libraries

This commit is contained in:
Christian Schabesberger 2024-07-08 16:05:37 +02:00
parent d8e7c5880c
commit 40295b0476
6 changed files with 32 additions and 7 deletions

View File

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">

View File

@ -1,6 +1,9 @@
import java.util.regex.Pattern.compile
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.kotlin.kapt)
}
android {
@ -40,6 +43,7 @@ android {
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
@ -53,6 +57,13 @@ dependencies {
implementation(libs.androidx.material3)
implementation(libs.androidx.ui.tooling)
implementation(libs.androidx.material.icons.extended.android)
implementation(libs.androidx.media3.exoplayer)
implementation(libs.androidx.media3.ui)
implementation(libs.hilt.android)
implementation(libs.androidx.lifecycle.viewmodel.compose)
kapt(libs.hilt.android.compiler)
kapt(libs.androidx.hilt.compiler)
implementation(libs.androidx.hilt.navigation.compose)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)

View File

@ -7,7 +7,7 @@ import android.view.ViewGroup
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.platform.ViewCompositionStrategy
import androidx.fragment.app.Fragment
import net.newpipe.newplayer.ui.VideoPlayerUI
import net.newpipe.newplayer.ui.VideoPlayerControllerUI
import net.newpipe.newplayer.ui.theme.VideoPlayerTheme
class PlayerFragment : Fragment() {
@ -24,7 +24,7 @@ class PlayerFragment : Fragment() {
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
setContent {
VideoPlayerTheme {
VideoPlayerUI()
VideoPlayerControllerUI()
}
}
}

View File

@ -58,7 +58,7 @@ import net.newpipe.newplayer.ui.theme.VideoPlayerTheme
import net.newpipe.newplayer.ui.theme.video_player_onSurface
@Composable
fun VideoPlayerUI() {
fun VideoPlayerControllerUI() {
Surface(
modifier = Modifier
.fillMaxSize()
@ -336,7 +336,7 @@ private fun ViewInFullScreen() {
@Composable
fun PlayerUIPreviewEmbeded() {
VideoPlayerTheme {
VideoPlayerUI()
VideoPlayerControllerUI()
}
}
@ -344,7 +344,7 @@ fun PlayerUIPreviewEmbeded() {
@Composable
fun PlayerUIPreviewLandscape() {
VideoPlayerTheme {
VideoPlayerUI()
VideoPlayerControllerUI()
}
}
@ -352,6 +352,6 @@ fun PlayerUIPreviewLandscape() {
@Composable
fun PlayerUIPreviewPortrait() {
VideoPlayerTheme {
VideoPlayerUI()
VideoPlayerControllerUI()
}
}

View File

@ -2,4 +2,5 @@
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.jetbrains.kotlin.android) apply false
alias(libs.plugins.kotlin.kapt) apply false
}

View File

@ -13,6 +13,12 @@ activityCompose = "1.9.0"
material3 = "1.2.1"
uiTooling = "1.6.8"
materialIconsExtendedAndroid = "1.7.0-beta04"
media3Ui = "1.4.0-beta01"
hiltAndroid = "2.51.1"
hiltCompiler = "1.2.0"
hiltNavigationCompose = "1.2.0"
hiltAndroidCompiler = "2.51.1"
lifecycleViewmodelCompose = "2.8.3"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
@ -27,8 +33,16 @@ androidx-activity-compose = { group = "androidx.activity", name = "activity-comp
androidx-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "material3" }
androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "uiTooling" }
androidx-material-icons-extended-android = { group = "androidx.compose.material", name = "material-icons-extended-android", version.ref = "materialIconsExtendedAndroid" }
androidx-media3-exoplayer = { group = "androidx.media3", name = "media3-exoplayer", version.ref = "media3Ui" }
androidx-media3-ui = { group = "androidx.media3", name = "media3-ui", version.ref = "media3Ui" }
hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hiltAndroid" }
androidx-hilt-compiler = { group = "androidx.hilt", name = "hilt-compiler", version.ref = "hiltCompiler" }
androidx-hilt-navigation-compose = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "hiltNavigationCompose" }
hilt-android-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "hiltAndroidCompiler" }
androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycleViewmodelCompose" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }