Skip to content

Commit

Permalink
Updated jetpack compose to -beta01
Browse files Browse the repository at this point in the history
  • Loading branch information
tehras committed Feb 27, 2021
1 parent 16be917 commit b1b29e5
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 37 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Compose Charts

This is an exploratory playground library to figure out how to Draw and animate using Android Jetpack Compose library.
Currently this is using `1.0.0-alpha12` library.
Currently this is using `1.0.0-beta01` library.

## How it looks:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ fun BarChartScreen() {
title = { Text(text = "Bar Chart") }
)
},
bodyContent = { BarChartScreenContent() }
)
) { BarChartScreenContent() }
}

@Composable
Expand Down Expand Up @@ -80,13 +79,15 @@ fun DrawValueLocation(
}

Row(
modifier = Modifier.fillMaxWidth()
modifier = Modifier
.fillMaxWidth()
.padding(top = Margins.verticalLarge),
verticalAlignment = CenterVertically
) {
Row(
horizontalArrangement = Arrangement.SpaceEvenly,
modifier = Modifier.fillMaxWidth()
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = Margins.horizontal, vertical = Margins.vertical)
.align(CenterVertically)
) {
Expand Down Expand Up @@ -146,7 +147,8 @@ fun AddOrRemoveBar(barChartDataModel: BarChartDataModel) {
@Composable
private fun BarChartRow(barChartDataModel: BarChartDataModel) {
Row(
modifier = Modifier.fillMaxWidth()
modifier = Modifier
.fillMaxWidth()
.height(250.dp)
.padding(vertical = Margins.verticalLarge)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ fun LineChartScreen() {
title = { Text(text = "Line Chart") }
)
},
bodyContent = { LineChartScreenContent() }
)
) { LineChartScreenContent() }
}

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ fun PieChartScreen() {
title = { Text(text = "Pie Chart") }
)
},
bodyContent = { PieChartScreenContent() }
)
) { PieChartScreenContent() }
}

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ import com.github.tehras.charts.ui.ChartScreenStatus
@Composable
fun SelectChartScreen() {
Scaffold(
topBar = { TopAppBar(title = { Text(text = "Select Chart") }) },
bodyContent = { SelectChartScreenContent() }
)
topBar = { TopAppBar(title = { Text(text = "Select Chart") }) }
) { SelectChartScreenContent() }
}

@Composable
Expand Down
42 changes: 20 additions & 22 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

buildscript {
dependencies {
classpath("com.android.tools.build:gradle:7.0.0-alpha06")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}")
}
dependencies {
classpath("com.android.tools.build:gradle:7.0.0-alpha08")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}")
}

repositories {
google()
jcenter()
gradlePluginPortal()
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-eap") }
}
repositories {
google()
gradlePluginPortal()
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-eap") }
}
}

subprojects {
repositories {
google()
jcenter()
gradlePluginPortal()
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-eap") }
}
repositories {
google()
gradlePluginPortal()
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-eap") }
}

tasks.withType<KotlinCompile> {
kotlinOptions {
// Allow warnings when running from IDE, makes it easier to experiment.
allWarningsAsErrors = true
tasks.withType<KotlinCompile> {
kotlinOptions {
// Allow warnings when running from IDE, makes it easier to experiment.
allWarningsAsErrors = true

jvmTarget = "1.8"
}
jvmTarget = "1.8"
}
}
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

object Versions {
const val composeCompilerVersion = "1.4.30"
const val compose = "1.0.0-alpha12"
const val compose = "1.0.0-beta01"
const val kotlin = "1.4.30"
const val targetSdk = 30
const val buildVersion = "30.0.2"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jun 13 09:37:52 PDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-6.8.1-bin.zip
distributionUrl=https://services.gradle.org/distributions/gradle-6.8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit b1b29e5

Please sign in to comment.