Skip to content

Commit

Permalink
Upgrade sisyphus to 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
devkanro committed Oct 27, 2023
1 parent 2911463 commit 17994fe
Show file tree
Hide file tree
Showing 9 changed files with 230 additions and 158 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ jobs:
name: Gradle Wrapper
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2
Expand Down Expand Up @@ -110,7 +105,7 @@ jobs:
path: |
./desktop/build/compose/binaries/main/msi/
./desktop/build/compose/binaries/main/deb/
./desktop/build/compose/notarization/main/*/*.dmg
./desktop/build/compose/notarization/**/*.dmg
# Prepare a draft release for GitHub Releases page for the manual verification
# If accepted and published, release workflow would be triggered
Expand Down
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
plugins {
kotlin("jvm") version "1.6.10" apply false
id("org.jetbrains.compose") version "1.1.1" apply false
id("com.bybutter.sisyphus.protobuf") version "1.3.21" apply false
kotlin("jvm") version "1.9.10" apply false
id("org.jetbrains.compose") version "1.5.2" apply false
id("com.bybutter.sisyphus.protobuf") version "2.1.0" apply false
id("org.jlleitschuh.gradle.ktlint") version "10.0.0" apply false
id("org.jetbrains.changelog") version "1.3.0"
}

allprojects {
group = "io.kanro"
version = "1.4.7"
version = "1.5.0"

repositories {
mavenLocal()
Expand Down
12 changes: 6 additions & 6 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ protobuf {
}

dependencies {
api("io.grpc:grpc-core:1.42.1")
api("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.6.0")
api("com.bybutter.sisyphus:sisyphus-grpc-coroutine:1.3.35")
api("com.bybutter.sisyphus:sisyphus-jackson-protobuf:1.3.35")
api("io.grpc:grpc-netty:1.42.1")
api("io.grpc:grpc-core:1.59.0")
api("io.grpc:grpc-netty:1.59.0")
api("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.7.3")
api("com.bybutter.sisyphus:sisyphus-grpc-coroutine:2.1.0")
api("com.bybutter.sisyphus:sisyphus-jackson-protobuf:2.1.0")
api("io.netty:netty-handler-proxy:4.1.72.Final")
api("org.bouncycastle:bcpkix-jdk15on:1.70")

Expand All @@ -29,7 +29,7 @@ tasks.test {
}

tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "16"
kotlinOptions.jvmTarget = "17"
}

ktlint {
Expand Down
18 changes: 9 additions & 9 deletions desktop/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

Expand All @@ -17,30 +16,31 @@ repositories {

dependencies {
implementation(project(":core"))
implementation("com.bybutter.compose:compose-jetbrains-theme:1.1.0")
implementation("com.bybutter.compose:compose-jetbrains-theme:2.2.0")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.6.10")
testImplementation(kotlin("test-junit5"))
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.2")
implementation("net.harawata:appdirs:1.2.1")
implementation("com.github.java-json-tools:json-patch:1.13")
implementation("com.github.Dansoftowner:jSystemThemeDetector:3.8")
implementation("com.bybutter.sisyphus.tools:sisyphus-protoc-runner:1.3.35")
implementation("com.bybutter.sisyphus.tools:sisyphus-protoc-runner:2.1.0")
implementation("ch.qos.logback:logback-classic:1.4.1")

implementation(compose.desktop.currentOs)
implementation(compose.uiTooling)

testImplementation(kotlin("test-junit5"))
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.2")
}

tasks.test {
useJUnitPlatform()
}

tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "16"
kotlinOptions.jvmTarget = "17"
kotlinOptions.freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"
"plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true",
)
}

Expand All @@ -49,7 +49,7 @@ compose.desktop {
mainClass = "io.kanro.mediator.desktop.MainKt"
nativeDistributions {
jvmArgs(
"-Dapple.awt.application.appearance=system"
"-Dapple.awt.application.appearance=system",
)
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
modules("java.management")
Expand Down
29 changes: 17 additions & 12 deletions desktop/src/main/kotlin/io/kanro/mediator/desktop/ui/CallList.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ import com.bybutter.sisyphus.protobuf.primitives.minus
import com.bybutter.sisyphus.protobuf.primitives.toTime
import io.grpc.Status
import io.kanro.compose.jetbrains.JBTheme
import io.kanro.compose.jetbrains.SelectionScope
import io.kanro.compose.jetbrains.control.Icon
import io.kanro.compose.jetbrains.control.JPanelBorder
import io.kanro.compose.jetbrains.control.ListItemHoverIndication
import io.kanro.compose.jetbrains.control.SelectionScope
import io.kanro.compose.jetbrains.control.Text
import io.kanro.compose.jetbrains.control.jBorder
import io.kanro.mediator.desktop.model.CallEvent
Expand Down Expand Up @@ -111,7 +111,7 @@ fun CallList(modifier: Modifier = Modifier) {

VerticalScrollbar(
rememberScrollbarAdapter(listState),
Modifier.align(Alignment.CenterEnd)
Modifier.align(Alignment.CenterEnd),
)
}
}
Expand All @@ -134,7 +134,7 @@ fun CallRowHeader(
.fillMaxWidth()
.background(JBTheme.panelColors.bgContent)
.jBorder(bottom = 1.dp, color = JBTheme.panelColors.border),
verticalAlignment = Alignment.CenterVertically
verticalAlignment = Alignment.CenterVertically,
) {
val idState = rememberDraggableState { delta ->
resizing(0, delta)
Expand All @@ -150,7 +150,7 @@ fun CallRowHeader(
return pointerHoverIcon(PointerIcon(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR)))
.draggable(
orientation = Orientation.Horizontal,
state = state
state = state,
)
}

Expand Down Expand Up @@ -183,7 +183,7 @@ fun CallRow(
selected: Boolean,
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
role: Role? = null,
onClick: () -> Unit
onClick: () -> Unit,
) {
SelectionScope(selected) {
Row(
Expand All @@ -202,7 +202,7 @@ fun CallRow(
interactionSource = interactionSource,
indication = ListItemHoverIndication,
onClick = onClick,
role = role
role = role,
)
.run {
if (selected) {
Expand All @@ -213,7 +213,7 @@ fun CallRow(
}
.hoverable(interactionSource)
.jBorder(bottom = 1.dp, color = JBTheme.panelColors.border),
verticalAlignment = Alignment.CenterVertically
verticalAlignment = Alignment.CenterVertically,
) {
val call by record.asState()
val start = call.start()
Expand Down Expand Up @@ -296,25 +296,30 @@ fun CallIcon(call: CallTimeline, modifier: Modifier = Modifier) {
Status.Code.OK -> Icon("icons/toolbarPassed.svg")

Status.Code.ABORTED,
Status.Code.CANCELLED -> Icon("icons/toolbarTerminated.svg")
Status.Code.CANCELLED,
-> Icon("icons/toolbarTerminated.svg")

Status.Code.DEADLINE_EXCEEDED,
Status.Code.PERMISSION_DENIED,
Status.Code.UNAUTHENTICATED -> Icon("icons/toolbarSkipped.svg")
Status.Code.UNAUTHENTICATED,
-> Icon("icons/toolbarSkipped.svg")

Status.Code.ALREADY_EXISTS,
Status.Code.RESOURCE_EXHAUSTED,
Status.Code.FAILED_PRECONDITION,
Status.Code.OUT_OF_RANGE,
Status.Code.UNAVAILABLE,
Status.Code.INVALID_ARGUMENT -> Icon("icons/toolbarFailed.svg")
Status.Code.INVALID_ARGUMENT,
-> Icon("icons/toolbarFailed.svg")

Status.Code.DATA_LOSS,
Status.Code.NOT_FOUND -> Icon("icons/testUnknown.svg")
Status.Code.NOT_FOUND,
-> Icon("icons/testUnknown.svg")

Status.Code.UNIMPLEMENTED,
Status.Code.UNKNOWN,
Status.Code.INTERNAL -> Icon("icons/toolbarError.svg")
Status.Code.INTERNAL,
-> Icon("icons/toolbarError.svg")

else -> Icon("icons/run.svg")
}
Expand Down
Loading

0 comments on commit 17994fe

Please sign in to comment.