mirror of
https://github.com/owenlejeune/TVTime.git
synced 2026-02-18 10:56:50 -05:00
convert to m3
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
import com.owenlejeune.tvtime.buildsrc.Dependencies
|
||||
import com.owenlejeune.tvtime.buildsrc.Versions
|
||||
import com.owenlejeune.tvtime.buildsrc.Config
|
||||
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
id 'kotlin-android'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk 32
|
||||
compileSdkVersion(Config.compileSdk)
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.owenlejeune.tvtime"
|
||||
minSdk 23
|
||||
targetSdk 32
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
minSdkVersion(Config.minSdk)
|
||||
targetSdkVersion(Config.targetSdk)
|
||||
versionCode = Config.versionCode
|
||||
versionName = Config.versionName
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
@@ -36,7 +41,7 @@ android {
|
||||
compose true
|
||||
}
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion compose_version
|
||||
kotlinCompilerExtensionVersion Versions.compose
|
||||
}
|
||||
packagingOptions {
|
||||
resources {
|
||||
@@ -47,15 +52,15 @@ android {
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.7.0'
|
||||
implementation "androidx.compose.ui:ui:$compose_version"
|
||||
implementation "androidx.compose.material:material:$compose_version"
|
||||
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
|
||||
implementation 'androidx.activity:activity-compose:1.3.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
|
||||
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
|
||||
implementation Dependencies.AndroidX.ktxCore
|
||||
implementation Dependencies.Compose.ui
|
||||
implementation Dependencies.Compose.material3
|
||||
implementation Dependencies.Compose.uiToolingPreview
|
||||
implementation Dependencies.Lifecycle.runtime
|
||||
implementation Dependencies.Compose.activity
|
||||
testImplementation Dependencies.Testing.junit
|
||||
androidTestImplementation Dependencies.Testing.androidXJunit
|
||||
androidTestImplementation Dependencies.Testing.espressoCore
|
||||
androidTestImplementation Dependencies.Testing.composeJunit
|
||||
debugImplementation Dependencies.Compose.uiTooling
|
||||
}
|
||||
@@ -4,9 +4,7 @@ import android.os.Bundle
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.Surface
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
@@ -25,8 +23,7 @@ class MainActivity : ComponentActivity() {
|
||||
fun MyApp() {
|
||||
TVTimeTheme {
|
||||
Surface(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
color = MaterialTheme.colors.background
|
||||
modifier = Modifier.fillMaxSize()
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.owenlejeune.tvtime.ui.theme
|
||||
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.Shapes
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
val Shapes = Shapes(
|
||||
small = RoundedCornerShape(4.dp),
|
||||
medium = RoundedCornerShape(4.dp),
|
||||
large = RoundedCornerShape(0.dp)
|
||||
)
|
||||
//import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
//import androidx.compose.material.Shapes
|
||||
//import androidx.compose.ui.unit.dp
|
||||
//
|
||||
//val Shapes = Shapes(
|
||||
// small = RoundedCornerShape(4.dp),
|
||||
// medium = RoundedCornerShape(4.dp),
|
||||
// large = RoundedCornerShape(0.dp)
|
||||
//)
|
||||
@@ -1,21 +1,21 @@
|
||||
package com.owenlejeune.tvtime.ui.theme
|
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.darkColors
|
||||
import androidx.compose.material.lightColors
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
private val DarkColorPalette = darkColors(
|
||||
private val DarkColorPalette = darkColorScheme(
|
||||
primary = Purple200,
|
||||
primaryVariant = Purple700,
|
||||
secondary = Teal200
|
||||
secondary = Purple700,
|
||||
tertiary = Teal200
|
||||
)
|
||||
|
||||
private val LightColorPalette = lightColors(
|
||||
private val LightColorPalette = lightColorScheme(
|
||||
primary = Purple500,
|
||||
primaryVariant = Purple700,
|
||||
secondary = Teal200
|
||||
secondary = Purple700,
|
||||
tertiary = Teal200
|
||||
|
||||
/* Other default colors to override
|
||||
background = Color.White,
|
||||
@@ -36,9 +36,8 @@ fun TVTimeTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable
|
||||
}
|
||||
|
||||
MaterialTheme(
|
||||
colors = colors,
|
||||
colorScheme = colors,
|
||||
typography = Typography,
|
||||
shapes = Shapes,
|
||||
content = content
|
||||
)
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.owenlejeune.tvtime.ui.theme
|
||||
|
||||
import androidx.compose.material.Typography
|
||||
import androidx.compose.material3.Typography
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
@@ -8,7 +8,7 @@ import androidx.compose.ui.unit.sp
|
||||
|
||||
// Set of Material typography styles to start with
|
||||
val Typography = Typography(
|
||||
body1 = TextStyle(
|
||||
bodyLarge = TextStyle(
|
||||
fontFamily = FontFamily.Default,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 16.sp
|
||||
|
||||
Reference in New Issue
Block a user