mirror of
https://github.com/Shabinder/SpotiFlyer.git
synced 2024-11-23 09:24:33 +01:00
error remains in building.(Compose is in alpha stage)
This commit is contained in:
parent
6d4a33e9ad
commit
14eeee195f
@ -1,9 +1,9 @@
|
||||
import org.jetbrains.compose.compose
|
||||
|
||||
plugins {
|
||||
id("org.jetbrains.compose")
|
||||
id("com.android.application")
|
||||
kotlin("android")
|
||||
id("org.jetbrains.compose")
|
||||
}
|
||||
|
||||
group = "com.shabinder"
|
||||
@ -46,6 +46,25 @@ android {
|
||||
exclude(group = "androidx.compose.ui")
|
||||
}
|
||||
}
|
||||
// Remove After upgrading dependency
|
||||
configurations.all {
|
||||
resolutionStrategy.eachDependency {
|
||||
if (requested.group.contains("org.jetbrains.compose")) {
|
||||
useVersion("0.3.0-build146")
|
||||
because("wait for decompose to upgrade too")
|
||||
}
|
||||
}
|
||||
}
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
packagingOptions {
|
||||
exclude("META-INF/*")
|
||||
}
|
||||
composeOptions {
|
||||
kotlinCompilerVersion = Versions.kotlinVersion
|
||||
//kotlinCompilerExtensionVersion = Versions.compose
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
useIR = true
|
||||
@ -54,18 +73,20 @@ android {
|
||||
dependencies {
|
||||
implementation(compose.material)
|
||||
implementation(compose.materialIconsExtended)
|
||||
|
||||
implementation(project(":common:database"))
|
||||
implementation(project(":common:compose-ui"))
|
||||
implementation(project(":common:dependency-injection"))
|
||||
implementation(project(":common:data-models"))
|
||||
implementation(Androidx.appCompat)
|
||||
/*
|
||||
implementation(Androidx.coroutines)
|
||||
implementation(Androidx.core)
|
||||
implementation(Androidx.palette)
|
||||
//implementation(JetBrains.Compose.materialIcon)
|
||||
*/
|
||||
|
||||
//Compose-Navigation
|
||||
implementation(Androidx.composeNavigation)
|
||||
//implementation(Androidx.composeNavigation)
|
||||
|
||||
implementation(Koin.android)
|
||||
implementation(Koin.androidViewModel)
|
||||
@ -73,6 +94,7 @@ dependencies {
|
||||
//DECOMPOSE
|
||||
implementation(Decompose.decompose)
|
||||
implementation(Decompose.extensionsCompose)
|
||||
/*
|
||||
|
||||
//Lifecycle
|
||||
Versions.androidLifecycle.let{
|
||||
@ -87,6 +109,7 @@ dependencies {
|
||||
implementation("dev.chrisbanes.accompanist:accompanist-coil:$it")
|
||||
implementation("dev.chrisbanes.accompanist:accompanist-insets:$it")
|
||||
}
|
||||
*/
|
||||
|
||||
Extras.Android.apply {
|
||||
implementation(appUpdator)
|
||||
@ -112,7 +135,8 @@ dependencies {
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_1_8.toString()
|
||||
freeCompilerArgs = listOf("-Xallow-jvm-ir-dependencies", "-Xskip-prerelease-check",
|
||||
freeCompilerArgs = listOf("-Xallow-jvm-ir-dependencies","-Xallow-unstable-dependencies",
|
||||
"-Xskip-prerelease-check",
|
||||
"-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi"
|
||||
)
|
||||
}
|
||||
|
@ -2,8 +2,8 @@ package com.shabinder.android
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.compose.ui.platform.setContent
|
||||
import com.arkivanov.decompose.ComponentContext
|
||||
import androidx.compose.ui.platform.setContent
|
||||
import com.arkivanov.decompose.extensions.compose.jetbrains.rootComponent
|
||||
import com.arkivanov.mvikotlin.logging.store.LoggingStoreFactory
|
||||
import com.arkivanov.mvikotlin.main.store.DefaultStoreFactory
|
||||
|
@ -12,14 +12,11 @@ allprojects {
|
||||
maven(url = "https://kotlin.bintray.com/kotlinx/")
|
||||
maven(url = "https://kotlin.bintray.com/kotlin-js-wrappers/")
|
||||
maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
flatDir {
|
||||
dirs("fuzzywuzzy")
|
||||
}
|
||||
}
|
||||
}
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21")
|
||||
classpath(JetBrains.Kotlin.gradlePlugin)
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,4 +27,4 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||
"-Xuse-experimental=kotlinx.coroutines.TheAnnotationYouWantToDisable"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ plugins {
|
||||
|
||||
group = "com.shabinder"
|
||||
version = "2.1"
|
||||
|
||||
buildscript{
|
||||
repositories {
|
||||
// TODO: remove after new build is published
|
||||
@ -17,12 +16,11 @@ buildscript{
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:4.0.2")
|
||||
classpath("com.android.tools.build:gradle:4.0.1")
|
||||
classpath(JetBrains.Compose.gradlePlugin)
|
||||
classpath(JetBrains.Kotlin.gradlePlugin)
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven(url = "https://jitpack.io")
|
||||
jcenter()
|
||||
@ -32,7 +30,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("com.android.tools.build:gradle:4.0.2")
|
||||
implementation("com.android.tools.build:gradle:4.0.1")
|
||||
implementation(JetBrains.Compose.gradlePlugin)
|
||||
implementation(JetBrains.Kotlin.gradlePlugin)
|
||||
implementation(JetBrains.Kotlin.serialization)
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
object Versions {
|
||||
const val versionName = "2.2"
|
||||
const val kotlinVersion = "1.4.30"
|
||||
const val kotlinVersion = "1.4.21-2"
|
||||
|
||||
const val coroutinesVersion = "1.4.2"
|
||||
const val composeVersion = "1.0.0-alpha11"
|
||||
const val compose = "1.0.0-alpha11"
|
||||
const val coilVersion = "0.4.1"
|
||||
//DI
|
||||
const val kodein = "7.2.0"
|
||||
const val koin = "3.0.1-alpha-1"
|
||||
const val koin = "3.0.0-alpha-4"
|
||||
|
||||
//Logger
|
||||
const val kermit = "0.1.8"
|
||||
@ -46,6 +46,16 @@ object Androidx{
|
||||
|
||||
const val junit = "androidx.test.ext:junit:1.1.2"
|
||||
const val expresso = "androidx.test.espresso:espresso-core:3.3.0"
|
||||
|
||||
object Compose{
|
||||
const val materialIcon = "androidx.compose.material:material-icons-extended:${Versions.compose}"
|
||||
const val ui = "androidx.compose.ui:ui:${Versions.compose}"
|
||||
const val uiGraphics = "androidx.compose.ui:ui-graphics:${Versions.compose}"
|
||||
const val uiTooling = "androidx.compose.ui:ui-tooling:${Versions.compose}"
|
||||
const val foundationLayout = "androidx.compose.foundation:foundation-layout:${Versions.compose}"
|
||||
const val material = "androidx.compose.material:material:${Versions.compose}"
|
||||
const val runtimeLiveData = "androidx.compose.runtime:runtime-livedata:${Versions.compose}"
|
||||
}
|
||||
}
|
||||
object JetBrains {
|
||||
object Kotlin {
|
||||
@ -58,9 +68,8 @@ object JetBrains {
|
||||
|
||||
object Compose {
|
||||
// __LATEST_COMPOSE_RELEASE_VERSION__
|
||||
private const val VERSION = "0.3.0-build149"
|
||||
private const val VERSION = "0.3.0-build146"
|
||||
const val gradlePlugin = "org.jetbrains.compose:compose-gradle-plugin:$VERSION"
|
||||
const val materialIcon = "androidx.compose.material:material-icons-extended:${Versions.composeVersion}"
|
||||
}
|
||||
}
|
||||
object Decompose {
|
||||
|
@ -1,5 +1,3 @@
|
||||
//import gradle.kotlin.dsl.accessors._2e8a70bdda5e56ec477a6ff432ddf9d7.android
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
}
|
||||
@ -12,10 +10,10 @@ android {
|
||||
targetSdkVersion(Versions.targetSdkVersion)
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = Versions.composeVersion
|
||||
/*composeOptions {
|
||||
kotlinCompilerExtensionVersion = Versions.compose
|
||||
kotlinCompilerVersion = Versions.kotlinVersion
|
||||
}
|
||||
}*/
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
|
@ -3,22 +3,21 @@ import org.jetbrains.compose.compose
|
||||
plugins {
|
||||
id("multiplatform-compose-setup")
|
||||
id("android-setup")
|
||||
id("kotlin-parcelize")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation(compose.materialIconsExtended)
|
||||
//implementation(compose.materialIconsExtended)
|
||||
implementation("org.jetbrains.compose.material:material-icons-extended:0.3.0-build150")
|
||||
implementation(project(":common:dependency-injection"))
|
||||
implementation(project(":common:data-models"))
|
||||
implementation(project(":common:database"))
|
||||
//implementation(MVIKotlin.rx)
|
||||
implementation(SqlDelight.coroutineExtensions)
|
||||
implementation(MVIKotlin.coroutines)
|
||||
implementation(MVIKotlin.mvikotlin)
|
||||
//implementation(MVIKotlin.mvikotlinExtensionsReaktive)
|
||||
//implementation(Badoo.Reaktive.reaktive)
|
||||
implementation(Decompose.decompose)
|
||||
implementation(Decompose.extensionsCompose)
|
||||
|
||||
@ -34,7 +33,9 @@ kotlin {
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs = listOf("-Xallow-jvm-ir-dependencies", "-Xskip-prerelease-check",
|
||||
useIR = true
|
||||
freeCompilerArgs = listOf("-Xallow-jvm-ir-dependencies",
|
||||
"-Xallow-unstable-dependencies","-Xskip-prerelease-check",
|
||||
"-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
"-Xuse-experimental=kotlinx.coroutines.TheAnnotationYouWantToDisable"
|
||||
)
|
||||
|
@ -3,30 +3,29 @@ package com.shabinder.common.ui
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.vectorResource
|
||||
|
||||
@Composable
|
||||
actual fun DownloadImageTick(modifier: Modifier){
|
||||
actual fun DownloadImageTick(){
|
||||
Image(
|
||||
vectorResource(R.drawable.ic_tick),
|
||||
"Download Done",
|
||||
modifier
|
||||
painterResource(R.drawable.ic_tick),
|
||||
"Download Done"
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
actual fun DownloadImageError(modifier: Modifier){
|
||||
actual fun DownloadImageError(){
|
||||
Image(
|
||||
vectorResource(R.drawable.ic_error),
|
||||
"Error! Cant Download this track",
|
||||
modifier
|
||||
painterResource(R.drawable.ic_error),
|
||||
"Error! Cant Download this track"
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
actual fun DownloadImageArrow(modifier: Modifier){
|
||||
Image(
|
||||
vectorResource(R.drawable.ic_arrow),
|
||||
painterResource(R.drawable.ic_arrow),
|
||||
"Start Download",
|
||||
modifier
|
||||
)
|
||||
|
@ -150,7 +150,7 @@ fun DownloadAllButton(onClick: () -> Unit, modifier: Modifier = Modifier) {
|
||||
ExtendedFloatingActionButton(
|
||||
text = { Text("Download All") },
|
||||
onClick = onClick,
|
||||
icon = { Icon(imageVector = DownloadAllImage(),"Download All Button",tint = Color.Black) },
|
||||
icon = { Icon(imageVector = DownloadAllImage(),"Download All Button",tint = Color(0xFF000000)) },
|
||||
backgroundColor = colorAccent,
|
||||
modifier = modifier
|
||||
)
|
||||
|
@ -11,7 +11,7 @@ import androidx.compose.material.Icon
|
||||
import androidx.compose.material.TabRowDefaults.tabIndicatorOffset
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.DateRange
|
||||
import androidx.compose.material.icons.outlined.History
|
||||
import androidx.compose.material.icons.outlined.Info
|
||||
import androidx.compose.material.icons.rounded.*
|
||||
import androidx.compose.runtime.Composable
|
||||
@ -21,7 +21,6 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Brush
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
@ -98,7 +97,7 @@ fun HomeTabBar(
|
||||
icon = {
|
||||
when (category) {
|
||||
HomeCategory.About -> Icon(Icons.Outlined.Info,"Info Tab")
|
||||
HomeCategory.History -> Icon(Icons.Outlined.DateRange,"History Tab")
|
||||
HomeCategory.History -> Icon(Icons.Outlined.History,"History Tab")
|
||||
}
|
||||
}
|
||||
)
|
||||
@ -121,21 +120,21 @@ fun SearchPanel(
|
||||
value = link,
|
||||
onValueChange = updateLink ,
|
||||
leadingIcon = {
|
||||
Icon(Icons.Rounded.AddLink,"Link Text Box",tint = Color.LightGray)
|
||||
Icon(Icons.Rounded.AddLink,"Link Text Box",tint = Color(0xFFCCCCCC))//LightGray
|
||||
},
|
||||
label = { Text(text = "Paste Link Here...",color = Color.LightGray) },
|
||||
label = { Text(text = "Paste Link Here...",color = Color(0xFFCCCCCC)) },
|
||||
singleLine = true,
|
||||
textStyle = LocalTextStyle.current.merge(TextStyle(fontSize = 18.sp,color = Color.White)),
|
||||
//textStyle = LocalTextStyle.current.merge(TextStyle(fontSize = 18.sp,color = Color.White)),
|
||||
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Uri),
|
||||
modifier = modifier.padding(12.dp).fillMaxWidth()
|
||||
.border(
|
||||
BorderStroke(2.dp, Brush.horizontalGradient(listOf(colorPrimary, colorAccent))),
|
||||
RoundedCornerShape(30.dp)
|
||||
),
|
||||
backgroundColor = Color.Black,
|
||||
backgroundColor = Color(0xFF000000),
|
||||
shape = RoundedCornerShape(size = 30.dp),
|
||||
activeColor = Color.Transparent,
|
||||
inactiveColor = Color.Transparent,
|
||||
activeColor = transparent,
|
||||
inactiveColor = transparent,
|
||||
)
|
||||
OutlinedButton(
|
||||
modifier = Modifier.padding(12.dp).wrapContentWidth(),
|
||||
@ -156,10 +155,10 @@ fun SearchPanel(
|
||||
@Composable
|
||||
fun AboutColumn(modifier: Modifier = Modifier) {
|
||||
//TODO Make Scrollable
|
||||
Column(modifier.fillMaxSize()) {
|
||||
Column(modifier.fillMaxSize().verticalScroll(rememberScrollState())) {
|
||||
Card(
|
||||
modifier = modifier.fillMaxWidth(),
|
||||
border = BorderStroke(1.dp,Color.Gray)
|
||||
border = BorderStroke(1.dp,Color(0xFF888888))//Gray
|
||||
) {
|
||||
Column(modifier.padding(12.dp)) {
|
||||
Text(
|
||||
@ -172,28 +171,28 @@ fun AboutColumn(modifier: Modifier = Modifier) {
|
||||
Icon(
|
||||
imageVector = SpotifyLogo(),
|
||||
"Open Spotify",
|
||||
tint = Color.Unspecified,
|
||||
tint = unspecifiedColor,
|
||||
modifier = Modifier.clickable(
|
||||
onClick = { openPlatform("com.spotify.music","http://open.spotify.com") })
|
||||
)
|
||||
Spacer(modifier = modifier.padding(start = 16.dp))
|
||||
Icon(imageVector = GaanaLogo(),
|
||||
"Open Gaana",
|
||||
tint = Color.Unspecified,
|
||||
tint = unspecifiedColor,
|
||||
modifier = Modifier.clickable(
|
||||
onClick = { openPlatform("com.gaana","http://gaana.com") })
|
||||
)
|
||||
Spacer(modifier = modifier.padding(start = 16.dp))
|
||||
Icon(imageVector = YoutubeLogo(),
|
||||
"Open Youtube",
|
||||
tint = Color.Unspecified,
|
||||
tint = unspecifiedColor,
|
||||
modifier = Modifier.clickable(
|
||||
onClick = { openPlatform("com.google.android.youtube","http://m.youtube.com") })
|
||||
)
|
||||
Spacer(modifier = modifier.padding(start = 12.dp))
|
||||
Icon(imageVector = YoutubeMusicLogo(),
|
||||
"Open Youtube Music",
|
||||
tint = Color.Unspecified,
|
||||
tint = unspecifiedColor,
|
||||
modifier = Modifier.clickable(
|
||||
onClick = { openPlatform("com.google.android.apps.youtube.music","https://music.youtube.com/") })
|
||||
)
|
||||
@ -203,7 +202,7 @@ fun AboutColumn(modifier: Modifier = Modifier) {
|
||||
Spacer(modifier = Modifier.padding(top = 8.dp))
|
||||
Card(
|
||||
modifier = modifier.fillMaxWidth(),
|
||||
border = BorderStroke(1.dp,Color.Gray)
|
||||
border = BorderStroke(1.dp,Color(0xFF888888))//Gray
|
||||
) {
|
||||
Column(modifier.padding(12.dp)) {
|
||||
Text(
|
||||
@ -217,7 +216,7 @@ fun AboutColumn(modifier: Modifier = Modifier) {
|
||||
onClick = { openPlatform("","http://github.com/Shabinder/SpotiFlyer") })
|
||||
.padding(vertical = 6.dp)
|
||||
) {
|
||||
Icon(imageVector = GithubLogo(),"Open Project Repo",tint = Color.LightGray)
|
||||
Icon(imageVector = GithubLogo(),"Open Project Repo",tint = Color(0xFFCCCCCC))
|
||||
Spacer(modifier = Modifier.padding(start = 16.dp))
|
||||
Column {
|
||||
Text(
|
||||
|
@ -11,7 +11,6 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.arkivanov.decompose.extensions.compose.jetbrains.Children
|
||||
import com.shabinder.common.ui.utils.verticalGradientScrim
|
||||
import com.shabinder.common.list.SpotiFlyerListContent
|
||||
import com.shabinder.common.main.SpotiFlyerMainContent
|
||||
import com.shabinder.common.root.SpotiFlyerRoot.Child
|
||||
@ -20,14 +19,15 @@ import com.shabinder.common.ui.appNameStyle
|
||||
|
||||
@Composable
|
||||
fun SpotiFlyerRootContent(component: SpotiFlyerRoot) {
|
||||
val appBarColor = MaterialTheme.colors.surface.copy(alpha = 0.65f)
|
||||
val appBarColor = MaterialTheme.colors.surface
|
||||
Column(
|
||||
modifier = Modifier.fillMaxSize().verticalGradientScrim(
|
||||
//color = sharedViewModel.gradientColor.copy(alpha = 0.38f),
|
||||
modifier = Modifier.fillMaxSize()
|
||||
/*.verticalGradientScrim(
|
||||
color = sharedViewModel.gradientColor.copy(alpha = 0.38f),
|
||||
color = appBarColor.copy(alpha = 0.38f),
|
||||
startYPercentage = 0.29f,
|
||||
endYPercentage = 0f,
|
||||
)
|
||||
)*/
|
||||
) {
|
||||
AppBar(
|
||||
backgroundColor = appBarColor,
|
||||
@ -56,6 +56,7 @@ fun AppBar(
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
Image(
|
||||
imageVector = SpotiFlyerLogo(),
|
||||
"SpotiFlyer Logo",
|
||||
Modifier.preferredSize(32.dp)
|
||||
)
|
||||
Spacer(Modifier.padding(horizontal = 4.dp))
|
||||
|
@ -33,7 +33,7 @@ internal class SpotiFlyerRootImpl(
|
||||
private fun createChild(configuration: Configuration, componentContext: ComponentContext): Child =
|
||||
when (configuration) {
|
||||
is Configuration.Main -> Child.Main(spotiFlyerMain(componentContext))
|
||||
is Configuration.Edit -> Child.List(spotiFlyerList(componentContext, link = configuration.link))
|
||||
is Configuration.List -> Child.List(spotiFlyerList(componentContext, link = configuration.link))
|
||||
}
|
||||
|
||||
private fun spotiFlyerMain(componentContext: ComponentContext): SpotiFlyerMain =
|
||||
@ -60,7 +60,7 @@ internal class SpotiFlyerRootImpl(
|
||||
|
||||
private fun onMainOutput(output: SpotiFlyerMain.Output): Unit =
|
||||
when (output) {
|
||||
is SpotiFlyerMain.Output.Search -> router.push(Configuration.Edit(link = output.link))
|
||||
is SpotiFlyerMain.Output.Search -> router.push(Configuration.List(link = output.link))
|
||||
}
|
||||
|
||||
private fun onListOutput(output: SpotiFlyerList.Output): Unit =
|
||||
@ -73,6 +73,6 @@ internal class SpotiFlyerRootImpl(
|
||||
object Main : Configuration()
|
||||
|
||||
@Parcelize
|
||||
data class Edit(val link: String) : Configuration()
|
||||
data class List(val link: String) : Configuration()
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,10 @@ import androidx.compose.material.Colors
|
||||
import androidx.compose.material.darkColors
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.colorspace.ColorSpaces
|
||||
import androidx.compose.ui.graphics.colorspace.Illuminant
|
||||
import androidx.compose.ui.graphics.colorspace.Rgb
|
||||
import androidx.compose.ui.graphics.colorspace.TransferParameters
|
||||
import androidx.compose.ui.graphics.compositeOver
|
||||
|
||||
val colorPrimary = Color(0xFFFC5C7D)
|
||||
@ -29,26 +33,31 @@ val colorRedError = Color(0xFFFF9494)
|
||||
val colorSuccessGreen = Color(0xFF59C351)
|
||||
val darkBackgroundColor = Color(0xFF000000)
|
||||
val colorOffWhite = Color(0xFFE7E7E7)
|
||||
val transparent = Color(0x00000000)
|
||||
val unspecifiedColor =Color(0f, 0f, 0f, 0f)
|
||||
val black = Color(0xFF000000)
|
||||
val lightGray = Color(0xFFCCCCCC)
|
||||
|
||||
val SpotiFlyerColors = darkColors(
|
||||
primary = colorPrimary,
|
||||
onPrimary = Color.Black,
|
||||
onPrimary = black,
|
||||
primaryVariant = colorPrimaryDark,
|
||||
secondary = colorAccent,
|
||||
onSecondary = Color.Black,
|
||||
onSecondary = black,
|
||||
error = colorRedError,
|
||||
onError = Color.Black,
|
||||
onError = black,
|
||||
surface = darkBackgroundColor,
|
||||
background = darkBackgroundColor,
|
||||
onSurface = Color.LightGray,
|
||||
onBackground = Color.LightGray
|
||||
onSurface = lightGray,
|
||||
onBackground = lightGray
|
||||
)
|
||||
|
||||
/**
|
||||
* Return the fully opaque color that results from compositing [onSurface] atop [surface] with the
|
||||
* given [alpha]. Useful for situations where semi-transparent colors are undesirable.
|
||||
*/
|
||||
/*
|
||||
@Composable
|
||||
fun Colors.compositedOnSurface(alpha: Float): Color {
|
||||
return onSurface.copy(alpha = alpha).compositeOver(surface)
|
||||
}
|
||||
}*/
|
||||
|
@ -2,13 +2,6 @@ package com.shabinder.common.ui
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.ImageBitmap
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.font.font
|
||||
import androidx.compose.ui.text.font.fontFamily
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import com.shabinder.common.Picture
|
||||
|
||||
@Composable
|
||||
|
@ -5,7 +5,7 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
|
||||
@Composable
|
||||
expect fun DownloadImageTick(modifier: Modifier = Modifier)
|
||||
expect fun DownloadImageTick()
|
||||
|
||||
@Composable
|
||||
expect fun DownloadAllImage():ImageVector
|
||||
@ -32,7 +32,7 @@ expect fun GithubLogo():ImageVector
|
||||
expect fun HeartIcon():ImageVector
|
||||
|
||||
@Composable
|
||||
expect fun DownloadImageError(modifier: Modifier = Modifier)
|
||||
expect fun DownloadImageError()
|
||||
|
||||
@Composable
|
||||
expect fun DownloadImageArrow(modifier: Modifier = Modifier)
|
||||
expect fun DownloadImageArrow(modifier: Modifier)
|
@ -44,7 +44,7 @@ fun Splash(modifier: Modifier = Modifier, onTimeout: () -> Unit) {
|
||||
delay(SplashWaitTime)
|
||||
currentOnTimeout()
|
||||
}
|
||||
Image(imageVector = SpotiFlyerLogo())
|
||||
Image(imageVector = SpotiFlyerLogo(),"SpotiFlyer Logo")
|
||||
MadeInIndia(Modifier.align(Alignment.BottomCenter))
|
||||
}
|
||||
}
|
||||
@ -67,7 +67,7 @@ fun MadeInIndia(
|
||||
fontSize = 22.sp
|
||||
)
|
||||
Spacer(modifier = Modifier.padding(start = 4.dp))
|
||||
Icon(HeartIcon(),tint = Color.Unspecified)
|
||||
Icon(HeartIcon(),"Love",tint = unspecifiedColor)
|
||||
Spacer(modifier = Modifier.padding(start = 4.dp))
|
||||
Text(
|
||||
text = " in India",
|
||||
|
@ -21,6 +21,7 @@ import androidx.compose.ui.graphics.compositeOver
|
||||
import androidx.compose.ui.graphics.luminance
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
/*
|
||||
|
||||
fun Color.contrastAgainst(background: Color): Float {
|
||||
val fg = if (alpha < 1f) compositeOver(background) else this
|
||||
@ -30,3 +31,4 @@ fun Color.contrastAgainst(background: Color): Float {
|
||||
|
||||
return max(fgLuminance, bgLuminance) / min(fgLuminance, bgLuminance)
|
||||
}
|
||||
*/
|
||||
|
@ -38,6 +38,7 @@ import kotlin.math.pow
|
||||
* @param numStops The number of color stops to draw in the gradient. Higher numbers result in
|
||||
* the higher visual quality at the cost of draw performance. Defaults to `16`.
|
||||
*/
|
||||
/*
|
||||
fun Modifier.verticalGradientScrim(
|
||||
color: Color,
|
||||
//@FloatRange(from = 0.0, to = 1.0)
|
||||
@ -79,3 +80,4 @@ fun Modifier.verticalGradientScrim(
|
||||
drawRect(brush = brush)
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
@ -7,18 +7,18 @@ import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.res.vectorXmlResource
|
||||
|
||||
@Composable
|
||||
actual fun DownloadImageTick(modifier: Modifier){
|
||||
actual fun DownloadImageTick(){
|
||||
Image(
|
||||
vectorXmlResource("common/compose-ui/src/main/res/drawable/ic_tick.xml"),
|
||||
modifier
|
||||
"Downloaded"
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
actual fun DownloadImageError(modifier: Modifier){
|
||||
actual fun DownloadImageError(){
|
||||
Image(
|
||||
vectorXmlResource("common/compose-ui/src/main/res/drawable/ic_error.xml"),
|
||||
modifier
|
||||
"Can't Download"
|
||||
)
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@ actual fun DownloadImageError(modifier: Modifier){
|
||||
actual fun DownloadImageArrow(modifier: Modifier){
|
||||
Image(
|
||||
vectorXmlResource("common/compose-ui/src/main/res/drawable/ic_arrow.xml"),
|
||||
"Download",
|
||||
modifier
|
||||
)
|
||||
}
|
||||
|
@ -13,3 +13,15 @@ kotlin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||
kotlinOptions {
|
||||
useIR = true
|
||||
freeCompilerArgs = listOf("-Xallow-jvm-ir-dependencies",
|
||||
"-Xallow-unstable-dependencies","-Xskip-prerelease-check",
|
||||
"-P", "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true",
|
||||
"-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
"-Xuse-experimental=kotlinx.coroutines.TheAnnotationYouWantToDisable"
|
||||
)
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@ final pathSeparator = System.properties["path.separator"]
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js() {
|
||||
/*js() {
|
||||
[compileKotlinJs, compileTestKotlinJs].each { configuration ->
|
||||
configuration.kotlinOptions {
|
||||
moduleKind = 'umd'
|
||||
@ -22,7 +22,7 @@ kotlin {
|
||||
metaInfo = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
/*
|
||||
wasm32("wasm")
|
||||
@ -63,7 +63,7 @@ kotlin {
|
||||
implementation 'junit:junit:4.12'
|
||||
}
|
||||
}
|
||||
jsMain {
|
||||
/*jsMain {
|
||||
kotlin.srcDir('src/jsMain/kotlin')
|
||||
dependencies {
|
||||
implementation kotlin("stdlib-js")
|
||||
@ -82,7 +82,7 @@ kotlin {
|
||||
implementation kotlin("test-js")
|
||||
implementation kotlin("stdlib-js")
|
||||
}
|
||||
}
|
||||
}*/
|
||||
/*nativeMain {
|
||||
kotlin.srcDir('src/nativeMain/kotlin')
|
||||
}*/
|
||||
@ -97,8 +97,8 @@ kotlin {
|
||||
}
|
||||
|
||||
//Workaround to copy kotlin libraries so they are visible during testing
|
||||
def jsLibDir = "$compileKotlinJs.destinationDir/lib"
|
||||
def jsTestLibDir = "$compileTestKotlinJs.destinationDir/lib"
|
||||
//def jsLibDir = "$compileKotlinJs.destinationDir/lib"
|
||||
//def jsTestLibDir = "$compileTestKotlinJs.destinationDir/lib"
|
||||
|
||||
//uncomment below to test JS. This conflicts with iOS config
|
||||
/*
|
||||
@ -130,6 +130,7 @@ jsTestClasses.dependsOn copyJsTestDependencies
|
||||
|
||||
|
||||
|
||||
/*
|
||||
node {
|
||||
version = nodeVersion
|
||||
download = true
|
||||
@ -192,4 +193,5 @@ publishing {
|
||||
artifactId = artifactId.replace(project.name, 'fuzzywuzzy-kotlin')
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https://services.gradle.org/distributions/gradle-6.8-rc-4-bin.zip
|
||||
distributionUrl=https://services.gradle.org/distributions/gradle-6.8-bin.zip
|
||||
|
@ -1,12 +1,3 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||
maven(url = "https://jitpack.io")
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "spotiflyer"
|
||||
enableFeaturePreview("GRADLE_METADATA")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user