Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,26 @@ 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. To find which version you published, open the SDK's `build.gradle` file and look for the `version = "x.y.z"` line near the bottom of the file. Then run:
```
./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
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