Skip to content

Commit

Permalink
chore(java): Run gradle fmt when building Java client
Browse files Browse the repository at this point in the history
  • Loading branch information
booniepepper committed Jul 27, 2023
1 parent fbb836e commit 856b8bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ GO_DOCKER_TAG = 1
DOTNET_DOCKER_TAG = 6.0
GOLINT_DOCKER_TAG = v1.51-alpine
BUSYBOX_DOCKER_TAG = 1
GRADLE_DOCKER_TAG = 8.2
PYTHON_DOCKER_TAG = 3.10
# Other config
CONFIG_DIR = ${PWD}/config
Expand Down Expand Up @@ -206,7 +207,7 @@ setup-new-sdk:
.PHONY: build-client-java
build-client-java:
make build-client sdk_language=java tmpdir=${TMP_DIR}
# ... any other custom build steps ...
make run-in-docker sdk_language=java image=gradle:${GRADLE_DOCKER_TAG} command="/bin/sh -c 'gradle fmt'"

.PHONY: test-client-java
test-client-java: build-client-java
Expand Down
4 changes: 3 additions & 1 deletion config/clients/java/template/Java/build.gradle.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,6 @@ spotless {
// Use spotless plugin to automatically format code, remove unused import, etc
// To apply changes directly to the file, run `gradlew spotlessApply`
// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle
tasks.register('fmt')
tasks.register('fmt') {
dependsOn 'spotlessApply'
}

0 comments on commit 856b8bd

Please sign in to comment.