diff --git a/temporal-workflowcheck/README.md b/temporal-workflowcheck/README.md index 6c32cd1ba1..7d433e0cd1 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,7 @@ 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`. Simply running the following will show help text: diff --git a/temporal-workflowcheck/build.gradle b/temporal-workflowcheck/build.gradle index ef6ac097ac..7672d5a4f3 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 '8.3.9' 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..3c99253540 100644 --- a/temporal-workflowcheck/samples/gradle/build.gradle +++ b/temporal-workflowcheck/samples/gradle/build.gradle @@ -22,8 +22,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