Building the Java SDK from source

Hey all – I’d like to build a distributable jar from the master branch of the Java SDK ( so I can pull in some unreleased fixes to test them locally. Ideally I would wind up with a temporal-sdk-x.xx.x-SNAPSHOT.jar that I can reference locally and/or upload to our private artifact server.

When I try to build this myself by running ./gradlew jar from the root of the repo, I wind up with two separate artifacts (temporal-sdk-0.xx.x-SNAPSHOT.jar and temporal-serviceclient-0.xx.x-SNAPSHOT.jar) while it appears that the official Maven jar seems to combine these two in a single jar.

So any hints on how to do this correctly would be appreciated!

1 Like

Going to reply to my own question here and say that this is really a Maven question and not a Temporal question. In temporal-sdk/build.gradle there are some comments that you can follow to publish the artifact locally. I suspect I should be able to build the final artifact using the mvn command line tool at this point.

There was a recent change that broke the temporal-sdk into two jars. The next release in maven central is going to have both of them.

Well, I have a silly question but the topic is strongly related: what about the javadoc of the sdk?

There are numerous problems if I clone the sdk from github to generate that, and I am no gradle expert (It’s been 5 years since I programmed java last so I still cannot manage “complex” gradle directives like these:-)).

Nevertheless, I am learning how temporal works, and it would be so nice to just browse the documentation as usual somewhere…