Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sproctor committed Aug 7, 2024
1 parent 89c55e0 commit b1b172a
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 46 deletions.
10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

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

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

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

1 change: 1 addition & 0 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
alias(libs.plugins.compose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
}
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.compose) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.vanniktech.base) apply false
}

Expand Down
11 changes: 6 additions & 5 deletions data-table-material/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.compose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.android.library)
alias(libs.plugins.vanniktech.base)
}
Expand All @@ -12,10 +13,8 @@ kotlin {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
jvmToolchain(11)
}
js(IR) {
jvm()
js {
browser()
}

Expand All @@ -41,12 +40,14 @@ kotlin {
implementation(libs.junit)
}
}
val desktopMain by getting {
val jvmMain by getting {
dependencies {
api(compose.preview)
}
}
}

jvmToolchain(11)
}

android {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
package com.seanproctor.datatable.material

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.*
import androidx.compose.material.Divider
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.LastPage
import androidx.compose.material.icons.filled.ChevronLeft
import androidx.compose.material.icons.filled.ChevronRight
import androidx.compose.material.icons.filled.FirstPage
import androidx.compose.material.icons.filled.LastPage
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -78,7 +74,7 @@ fun PaginatedDataTable(
onClick = { state.pageIndex = pageCount - 1 },
enabled = state.pageIndex < pageCount - 1
) {
Icon(Icons.Default.LastPage, "Last")
Icon(Icons.AutoMirrored.Filled.LastPage, "Last")
}
}
},
Expand Down
11 changes: 6 additions & 5 deletions data-table-material3/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.compose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.android.library)
alias(libs.plugins.vanniktech.base)
}
Expand All @@ -12,10 +13,8 @@ kotlin {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
jvmToolchain(11)
}
js(IR) {
jvm()
js {
browser()
}

Expand All @@ -41,12 +40,14 @@ kotlin {
implementation(libs.junit)
}
}
val desktopMain by getting {
val jvmMain by getting {
dependencies {
api(compose.preview)
}
}
}

jvmToolchain(11)
}

android {
Expand Down
11 changes: 6 additions & 5 deletions data-table/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.compose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.android.library)
alias(libs.plugins.vanniktech.base)
}
Expand All @@ -12,10 +13,8 @@ kotlin {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
jvmToolchain(11)
}
js(IR) {
jvm()
js {
browser()
}

Expand All @@ -40,12 +39,14 @@ kotlin {
implementation(libs.junit)
}
}
val desktopMain by getting {
val jvmMain by getting {
dependencies {
api(compose.preview)
}
}
}

jvmToolchain(11)
}

android {
Expand Down
9 changes: 5 additions & 4 deletions demo-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.compose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.android.library)
}

kotlin {
androidTarget()
jvm("desktop") {
jvmToolchain(11)
}
js(IR) {
jvm()
js {
browser()
}
sourceSets {
Expand All @@ -22,6 +21,8 @@ kotlin {
}
}
}

jvmToolchain(11)
}

android {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.seanproctor.datatable.demo

import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.Text
Expand All @@ -27,6 +28,7 @@ fun App(onRowClick: (Int) -> Unit) {
else -> throw IllegalStateException("Invalid column index")
}

LazyColumn { }
PaginatedDataTable(
columns = listOf(
DataColumn(
Expand All @@ -47,10 +49,10 @@ fun App(onRowClick: (Int) -> Unit) {
Text("Column2")
},
),
state = rememberPaginatedDataTableState(5),
state = rememberPaginatedDataTableState(15),
sortColumnIndex = sortColumnIndex,
sortAscending = sortAscending,
modifier = Modifier.verticalScroll(rememberScrollState()).fillMaxWidth(),
modifier = Modifier.fillMaxWidth(),
) {
sortedData.forEachIndexed { index, data ->
row(onClick = { onRowClick(index) }) {
Expand Down
9 changes: 5 additions & 4 deletions desktop/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.compose)
alias(libs.plugins.compose.compiler)
}

group = "com.seanproctor"
version = "1.0-SNAPSHOT"


kotlin {
jvm {
jvmToolchain(11)
withJava()
}
jvm()

sourceSets {
val jvmMain by getting {
dependencies {
Expand All @@ -20,6 +19,8 @@ kotlin {
}
}
}

jvmToolchain(11)
}

compose.desktop {
Expand Down
37 changes: 24 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
[versions]

activityCompose = "1.9.0"
kotlin = "1.9.23"
androidGradlePlugin = "8.2.2"
junit = "4.13.2"
compose = "1.6.2"
vanniktech = "0.27.0"

[libraries]

activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
junit = { module = "junit:junit", version.ref = "junit" }
## Generated by $ ./gradlew refreshVersionsCatalog

[plugins]

Expand All @@ -19,4 +7,27 @@ kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
vanniktech-base = { id = "com.vanniktech.maven.publish.base", version.ref = "vanniktech" }

[versions]

activityCompose = "1.9.1"
kotlin = "2.0.10"
androidGradlePlugin = "8.2.2"
## ⬆ = "8.3.0"
## ⬆ = "8.3.1"
## ⬆ = "8.3.2"
## ⬆ = "8.4.0"
## ⬆ = "8.4.1"
## ⬆ = "8.4.2"
## ⬆ = "8.5.0"
## ⬆ = "8.5.1"
junit = "4.13.2"
compose = "1.6.11"
vanniktech = "0.29.0"

[libraries]

activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
junit = { module = "junit:junit", version.ref = "junit" }
13 changes: 13 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ pluginManagement {
}
}

plugins {
// See https://jmfayard.github.io/refreshVersions
id("de.fayard.refreshVersions") version "0.60.5"
}

rootProject.name = "compose-data-table"

include(":android", ":desktop", ":demo-common", ":data-table", ":data-table-material", ":data-table-material3")

refreshVersions {
file("build/tmp/refreshVersions").mkdirs()
versionsPropertiesFile = file("build/tmp/refreshVersions/versions.properties")
rejectVersionIf {
candidate.stabilityLevel.isLessStableThan(current.stabilityLevel)
}
}

0 comments on commit b1b172a

Please sign in to comment.