From 935a287e32a4c745985799ebc33a6d8ed880a709 Mon Sep 17 00:00:00 2001 From: James Watkins-Harvey Date: Fri, 20 Feb 2026 11:43:58 -0500 Subject: [PATCH 1/4] Make workflowcheck -all jar a variant of the main artifact --- temporal-workflowcheck/README.md | 21 ++++++++++++--- temporal-workflowcheck/build.gradle | 27 ++----------------- .../samples/gradle-multi-project/README.md | 4 +-- .../project-app/build.gradle | 3 +-- .../samples/gradle/README.md | 5 +--- .../samples/gradle/build.gradle | 4 +-- .../samples/gradle/settings.gradle | 4 --- .../samples/maven/README.md | 14 +++------- temporal-workflowcheck/samples/maven/pom.xml | 3 ++- 9 files changed, 30 insertions(+), 55 deletions(-) diff --git a/temporal-workflowcheck/README.md b/temporal-workflowcheck/README.md index 6c32cd1ba1..3250743365 100644 --- a/temporal-workflowcheck/README.md +++ b/temporal-workflowcheck/README.md @@ -1,6 +1,6 @@ # Temporal Workflow Check for Java -Temporal workflowcheck is a utility scans Java bytecode looking for workflow implementation methods that do invalid +Temporal workflowcheck is a utility that scans Java bytecode looking for workflow implementation methods that do invalid things. This mostly centers around [workflow logic constraints](https://docs.temporal.io/dev-guide/java/foundations#workflow-logic-requirements) that require workflows are deterministic. Currently it will catch when a workflow method does any of the following: @@ -26,8 +26,23 @@ This software is beta quality. We are gathering feedback before considering it s ### Running manually The all-in-one JAR is best for running manually. Either download the latest version `-all.jar` from -https://repo1.maven.org/maven2/io/temporal/temporal-workflowcheck or build via `gradlew :temporal-workflowcheck:build` -then obtain `-all.jar` in `temporal-workflowcheck/build/libs`. +https://repo1.maven.org/maven2/io/temporal/temporal-workflowcheck or build via `gradlew :temporal-workflowcheck:build` then obtain `-all.jar` in `temporal-workflowcheck/build/libs`. + +As a dependency: + +```xml + + io.temporal + temporal-workflowcheck + all + +``` + +or + +``` +io.temporal:temporal-workflowcheck::all +``` Simply running the following will show help text: diff --git a/temporal-workflowcheck/build.gradle b/temporal-workflowcheck/build.gradle index ef6ac097ac..75e64affc3 100644 --- a/temporal-workflowcheck/build.gradle +++ b/temporal-workflowcheck/build.gradle @@ -1,6 +1,6 @@ plugins { id 'application' - id 'com.gradleup.shadow' version '8.3.3' + id 'com.gradleup.shadow' version '9.3.1' id 'java' } @@ -22,36 +22,14 @@ application { // Need all-in-one JAR shadowJar { relocate 'org.objectweb.asm', 'io.temporal.workflowcheck.shaded.org.objectweb.asm' - archiveClassifier = '' } + shadowJar.dependsOn(jar) build.dependsOn shadowJar distTar.dependsOn shadowJar distZip.dependsOn shadowJar startScripts.dependsOn shadowJar -// Configure publishing to publish both regular library jar and shadow executable jar -publishing { - publications { - // Regular library jar for programmatic usage and compile-time annotations. - // That publication is configured by the default setup in publishing.gradle. - // mavenJava(MavenPublication) { ... } - - // Fat executable jar with shaded dependencies - shadow(MavenPublication) { publication -> - project.shadow.component(publication) - artifactId = "${project.name}-all" - artifact sourcesJar - artifact javadocJar - } - } -} - -// Fix dependency issue with shadow publication metadata generation -tasks.named('generateMetadataFileForShadowPublication').configure { - dependsOn 'jar' -} - // Copy Java test source files to resources so they can be loaded at runtime tasks.register('copyJavaSourcesToResources', Copy) { from('src/test/java') { @@ -62,7 +40,6 @@ tasks.register('copyJavaSourcesToResources', Copy) { } processTestResources.dependsOn copyJavaSourcesToResources - spotless { java { toggleOffOn() diff --git a/temporal-workflowcheck/samples/gradle-multi-project/README.md b/temporal-workflowcheck/samples/gradle-multi-project/README.md index e8f88b2f7a..edc2ca9ecc 100644 --- a/temporal-workflowcheck/samples/gradle-multi-project/README.md +++ b/temporal-workflowcheck/samples/gradle-multi-project/README.md @@ -1,8 +1,6 @@ # Temporal Workflow Check for Java - Gradle Sample -This sample shows how to incorporate `workflowcheck` into a Gradle build that has multiple projects. Currently there are -no published releases, so this example includes the primary build in the [settings.gradle](settings.gradle) file. But -users may just want to reference a published JAR when it is available. +This sample shows how to incorporate `workflowcheck` into a Gradle build that has multiple projects. To run: diff --git a/temporal-workflowcheck/samples/gradle-multi-project/project-app/build.gradle b/temporal-workflowcheck/samples/gradle-multi-project/project-app/build.gradle index c9b8e15cd0..8fcd60e9cb 100644 --- a/temporal-workflowcheck/samples/gradle-multi-project/project-app/build.gradle +++ b/temporal-workflowcheck/samples/gradle-multi-project/project-app/build.gradle @@ -23,8 +23,7 @@ configurations { // Set the dependency dependencies { - // May want to add :all to the end of the dependency to get the shaded form - workflowcheckDependency 'io.temporal:temporal-workflowcheck:+' + workflowcheckDependency 'io.temporal:temporal-workflowcheck:+:all' } // Create the workflowcheck task diff --git a/temporal-workflowcheck/samples/gradle/README.md b/temporal-workflowcheck/samples/gradle/README.md index f9888ebd3e..65e2659da6 100644 --- a/temporal-workflowcheck/samples/gradle/README.md +++ b/temporal-workflowcheck/samples/gradle/README.md @@ -1,9 +1,6 @@ # Temporal Workflow Check for Java - Gradle Sample -This sample shows how to incorporate `workflowcheck` into a Gradle build. Currently there are no published releases, so -this example includes the primary build in the [settings.gradle](settings.gradle) file. But users may just want to -reference a published JAR when it is available. - +This sample shows how to incorporate `workflowcheck` into a Gradle build. To run: gradlew check diff --git a/temporal-workflowcheck/samples/gradle/build.gradle b/temporal-workflowcheck/samples/gradle/build.gradle index 8a02669e5a..026d61171f 100644 --- a/temporal-workflowcheck/samples/gradle/build.gradle +++ b/temporal-workflowcheck/samples/gradle/build.gradle @@ -11,6 +11,7 @@ repositories { dependencies { implementation 'io.temporal:temporal-sdk:1.22.3' + buildOnly 'io.temporal:temporal-workflowcheck:+:all' } // *** workflowcheck config *** @@ -22,8 +23,7 @@ configurations { // Set the dependency dependencies { - // May want to add :all to the end of the dependency to get the shaded form - workflowcheckDependency 'io.temporal:temporal-workflowcheck:+' + workflowcheckDependency 'io.temporal:temporal-workflowcheck:+:all' } // Create the workflowcheck task diff --git a/temporal-workflowcheck/samples/gradle/settings.gradle b/temporal-workflowcheck/samples/gradle/settings.gradle index 7843878f99..36f3b7e2f2 100644 --- a/temporal-workflowcheck/samples/gradle/settings.gradle +++ b/temporal-workflowcheck/samples/gradle/settings.gradle @@ -1,5 +1 @@ rootProject.name = 'temporal-workflowcheck-samples-gradle' - -// Add the workflowcheck project as a composite build. We are only doing this -// for the sample, normally this is not needed. -includeBuild '../../../' \ No newline at end of file diff --git a/temporal-workflowcheck/samples/maven/README.md b/temporal-workflowcheck/samples/maven/README.md index ba669c81e3..16081d9303 100644 --- a/temporal-workflowcheck/samples/maven/README.md +++ b/temporal-workflowcheck/samples/maven/README.md @@ -1,18 +1,10 @@ # Temporal Workflow Check for Java - Maven Sample -This sample shows how to incorporate `workflowcheck` into a Maven build. Currently there are no published releases, so -this example expects the primary Gradle to publish the JAR to a local Maven repo that this project references. In the -future, users may just want to reference a published JAR when it is available. +This sample shows how to incorporate `workflowcheck` into a Maven build. -To run, first publish the `workflowcheck` JAR to a local repository. ⚠️ WARNING: While there remain no published -releases of workflowcheck, it is currently undocumented on how to publish to a local/disk Maven repo. +To run, execute the following command from this dir: -Now with the local repository present, can run the following from this dir: - - mvn -U verify - -Note, this is a sample using the local repository so that's why we have `-U`. For normal use, `mvn verify` without the -`-U` can be used (and the `` section of the `pom.xml` can be removed). + mvn verify This will output something like: diff --git a/temporal-workflowcheck/samples/maven/pom.xml b/temporal-workflowcheck/samples/maven/pom.xml index ef9702baa2..b3d6c9a195 100644 --- a/temporal-workflowcheck/samples/maven/pom.xml +++ b/temporal-workflowcheck/samples/maven/pom.xml @@ -92,7 +92,8 @@ io.temporal temporal-workflowcheck - 1.0-SNAPSHOT + 1.33.0 + all From cac66eb5135f11d90084a09d730cc79563d09386 Mon Sep 17 00:00:00 2001 From: James Watkins-Harvey Date: Fri, 20 Feb 2026 16:53:49 -0500 Subject: [PATCH 2/4] Downgrade to shadow 8, as 9.x requires Java 17 --- temporal-workflowcheck/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/temporal-workflowcheck/build.gradle b/temporal-workflowcheck/build.gradle index 75e64affc3..7672d5a4f3 100644 --- a/temporal-workflowcheck/build.gradle +++ b/temporal-workflowcheck/build.gradle @@ -1,6 +1,6 @@ plugins { id 'application' - id 'com.gradleup.shadow' version '9.3.1' + id 'com.gradleup.shadow' version '8.3.9' id 'java' } From 1491f2dbd77ac348b1ecac18a8489ac6f49a153c Mon Sep 17 00:00:00 2001 From: James Watkins-Harvey Date: Fri, 20 Feb 2026 17:30:03 -0500 Subject: [PATCH 3/4] Address review comments --- temporal-workflowcheck/README.md | 8 ++++---- temporal-workflowcheck/samples/gradle/build.gradle | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/temporal-workflowcheck/README.md b/temporal-workflowcheck/README.md index 3250743365..d935ca9d05 100644 --- a/temporal-workflowcheck/README.md +++ b/temporal-workflowcheck/README.md @@ -28,20 +28,20 @@ This software is beta quality. We are gathering feedback before considering it s The all-in-one JAR is best for running manually. Either download the latest version `-all.jar` from https://repo1.maven.org/maven2/io/temporal/temporal-workflowcheck or build via `gradlew :temporal-workflowcheck:build` then obtain `-all.jar` in `temporal-workflowcheck/build/libs`. -As a dependency: +Add `temporal-workflowcheck` as a dependency to your `pom.xml`: ```xml io.temporal temporal-workflowcheck + N.N.N all ``` -or - +or to build.gradle: ``` -io.temporal:temporal-workflowcheck::all +compileOnly("io.temporal:temporal-workflowcheck:N.N.N:all") ``` Simply running the following will show help text: diff --git a/temporal-workflowcheck/samples/gradle/build.gradle b/temporal-workflowcheck/samples/gradle/build.gradle index 026d61171f..3c99253540 100644 --- a/temporal-workflowcheck/samples/gradle/build.gradle +++ b/temporal-workflowcheck/samples/gradle/build.gradle @@ -11,7 +11,6 @@ repositories { dependencies { implementation 'io.temporal:temporal-sdk:1.22.3' - buildOnly 'io.temporal:temporal-workflowcheck:+:all' } // *** workflowcheck config *** From 9c42e5368970144cedff23bbdfc0a65e6b3a6de9 Mon Sep 17 00:00:00 2001 From: James Watkins-Harvey Date: Fri, 20 Feb 2026 17:45:55 -0500 Subject: [PATCH 4/4] Address review comments --- temporal-workflowcheck/README.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/temporal-workflowcheck/README.md b/temporal-workflowcheck/README.md index d935ca9d05..7d433e0cd1 100644 --- a/temporal-workflowcheck/README.md +++ b/temporal-workflowcheck/README.md @@ -28,22 +28,6 @@ This software is beta quality. We are gathering feedback before considering it s The all-in-one JAR is best for running manually. Either download the latest version `-all.jar` from https://repo1.maven.org/maven2/io/temporal/temporal-workflowcheck or build via `gradlew :temporal-workflowcheck:build` then obtain `-all.jar` in `temporal-workflowcheck/build/libs`. - -Add `temporal-workflowcheck` as a dependency to your `pom.xml`: -```xml - - io.temporal - temporal-workflowcheck - N.N.N - all - -``` - -or to build.gradle: -``` -compileOnly("io.temporal:temporal-workflowcheck:N.N.N:all") -``` - Simply running the following will show help text: java -jar path/to/temporal-workflowcheck--all.jar --help