Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,24 @@ See more in https://github.com/indeedeng/iwf#what-is-iwf

Run the command `git submodule update --remote --merge` to update IDL to the latest commit

### Local testing

If you'd like to test your changes to the SDK with the workflows in the [samples](https://github.com/indeedeng/iwf-java-samples) repo,
use the local publishing command:

1. Run:
```
./gradlew publishToMavenLocal -x signMavenJavaPublication
```
2. In the [samples](https://github.com/indeedeng/iwf-java-samples) repo, make sure your `build.gradle` depends on the same version you just published, then run:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a dump question, but how do you know what the version is you just published. Whenever we used publocal it would be something like local-the date-library name.

Copy link
Copy Markdown
Member Author

@samuel27m samuel27m Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. Here, you'd open build.gradle and then see what is in the version variable to find which is the version you just published locally. I'll add this info in the README.

```
./gradlew --refresh-dependencies build
```
3. Once you're done, to remove the locally published version, run:
```
./gradlew unpublishFromMavenLocal
```

### Repo structure
* `.github/workflows/`: the GithubActions workflows
* `iwf-idl/`: the idl submodule
Expand Down
14 changes: 13 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ compileJava.dependsOn tasks.openApiGenerate

sourceSets.main.java.srcDirs += "$buildDir/generated/src/main/java"

// Custom task to unpublish from local Maven repository
// Usage: ./gradlew unpublishFromMavenLocal
task unpublishFromMavenLocal(type: Delete) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maven does not include a unpublish local option, and you'd have to manually remove them from a folder. Added a custom task to make this process easier 😄

def groupPath = "io/iworkflow/iwf-java-sdk"
def version = project.version
def m2Repo = "${System.getProperty('user.home')}/.m2/repository"
delete "$m2Repo/$groupPath/$version"
doFirst {
println "Deleting $m2Repo/$groupPath/$version"
}
}

publishing {
publications {
mavenJava(MavenPublication) {
Expand Down Expand Up @@ -173,4 +185,4 @@ nexusPublishing {
// password = project.property('myNexusPassword')
}
}
}
}
Loading