Skip to content

Commit 6d95922

Browse files
Merge branch 'main' into sedwards/update-publishing
2 parents 8e64be8 + 64f0760 commit 6d95922

File tree

7 files changed

+99
-0
lines changed

7 files changed

+99
-0
lines changed

gradle/libs.versions.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ groovy = "3.0.9"
4949
jUnit = "4.13.2"
5050
java-diff-utils = "4.12"
5151
javaParser = "3.24.0"
52+
jetbrains-compose-plugin = "1.7.3"
5253
kgx = "0.1.12"
5354
kotest = "5.1.0"
5455
# Keep this in sync with what is hard-coded in build-logic/settings.gradle.kts as that is upstream
@@ -106,6 +107,8 @@ ktlint = { id = "com.rickbusarow.ktlint", version.ref = "ktlint-gradle" }
106107
kotlinx-apiBinaryCompatibility = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinx-binary-compatibility" }
107108
mavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktech-publish" }
108109

110+
jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "jetbrains-compose-plugin" }
111+
109112
[libraries]
110113

111114
android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "agpVersion" }
@@ -212,6 +215,7 @@ kotlinx-binaryCompatibility-gradle-plugin = { module = "org.jetbrains.kotlinx:bi
212215
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
213216
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
214217
kotlinx-coroutines-rx2 = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-rx2", version.ref = "kotlinx-coroutines" }
218+
kotlinx-coroutines-swing = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-swing", version.ref = "kotlinx-coroutines" }
215219
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
216220
kotlinx-coroutines-test-common = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
217221
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization-json" }

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ include(
6767
":workflow-rx2",
6868
":workflow-testing",
6969
":workflow-tracing",
70+
":workflow-trace-viewer",
7071
":workflow-ui:compose",
7172
":workflow-ui:compose-tooling",
7273
":workflow-ui:core-common",

workflow-trace-viewer/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Workflow Trace Viewer
2+
3+
A Compose for Desktop app that can be used to view Workflow traces.
4+
5+
## Running
6+
7+
It can be run via Gradle using:
8+
9+
```shell
10+
./gradlew :workflow-trace-viewer:run
11+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
public final class com/squareup/workflow1/traceviewer/AppKt {
2+
public static final fun App (Landroidx/compose/runtime/Composer;I)V
3+
}
4+
5+
public final class com/squareup/workflow1/traceviewer/ComposableSingletons$MainKt {
6+
public static final field INSTANCE Lcom/squareup/workflow1/traceviewer/ComposableSingletons$MainKt;
7+
public fun <init> ()V
8+
public final fun getLambda$468449326$wf1_workflow_trace_viewer ()Lkotlin/jvm/functions/Function3;
9+
}
10+
11+
public final class com/squareup/workflow1/traceviewer/MainKt {
12+
public static final fun main ()V
13+
public static synthetic fun main ([Ljava/lang/String;)V
14+
}
15+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
2+
3+
plugins {
4+
id("kotlin-multiplatform")
5+
alias(libs.plugins.jetbrains.compose)
6+
alias(libs.plugins.compose.compiler)
7+
}
8+
9+
kotlin {
10+
jvm()
11+
12+
sourceSets {
13+
jvmMain {
14+
dependencies {
15+
implementation(compose.runtime)
16+
implementation(compose.foundation)
17+
implementation(compose.material)
18+
implementation(compose.ui)
19+
implementation(compose.components.resources)
20+
implementation(compose.components.uiToolingPreview)
21+
implementation(libs.androidx.lifecycle.viewmodel.core)
22+
implementation(libs.androidx.lifecycle.compose)
23+
implementation(compose.desktop.currentOs)
24+
implementation(libs.kotlinx.coroutines.swing)
25+
implementation(compose.materialIconsExtended)
26+
}
27+
}
28+
}
29+
}
30+
31+
compose {
32+
desktop {
33+
application {
34+
mainClass = "com.squareup.workflow1.traceviewer.MainKt"
35+
jvmArgs(
36+
"-Dapple.awt.application.appearance=system",
37+
)
38+
39+
nativeDistributions {
40+
includeAllModules = true
41+
targetFormats(TargetFormat.Dmg)
42+
packageName = "Workflow Trace Viewer"
43+
packageVersion = "1.0.0"
44+
macOS {
45+
bundleID = "com.squareup.workflow1.traceviewer"
46+
}
47+
}
48+
}
49+
}
50+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.squareup.workflow1.traceviewer
2+
3+
import androidx.compose.material.Text
4+
import androidx.compose.runtime.Composable
5+
6+
@Composable
7+
fun App() {
8+
Text("Hello world!")
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.squareup.workflow1.traceviewer
2+
3+
import androidx.compose.ui.window.singleWindowApplication
4+
5+
fun main() {
6+
singleWindowApplication(title = "Workflow Trace Viewer") {
7+
App()
8+
}
9+
}

0 commit comments

Comments
 (0)