Skip to content
Merged
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
23 changes: 12 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ SHELL := bash
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --no-print-directory
GRADLE ?= ./gradlew

.PHONY: all
all: lint generate build docs conformance ## Run all tests and lint (default)

.PHONY: build
build: ## Build the entire project.
./gradlew build
$(GRADLE) build

.PHONY: docs
docs: ## Build javadocs for the project.
./gradlew javadoc
$(GRADLE) javadoc

.PHONY: checkgenerate
checkgenerate: generate ## Checks if `make generate` produces a diff.
Expand All @@ -25,37 +26,37 @@ checkgenerate: generate ## Checks if `make generate` produces a diff.

.PHONY: clean
clean: ## Delete intermediate build artifacts
./gradlew clean
$(GRADLE) clean

.PHONY: conformance
conformance: ## Execute conformance tests.
./gradlew conformance:conformance
$(GRADLE) conformance:conformance

.PHONY: help
help: ## Describe useful make targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%-15s %s\n", $$1, $$2}'

.PHONY: generate
generate: ## Regenerate code and license headers
./gradlew generate
$(GRADLE) generate

.PHONY: lint
lint: ## Lint code
./gradlew spotlessCheck
$(GRADLE) spotlessCheck

.PHONY: lintfix
lintfix: ## Applies the lint changes.
./gradlew spotlessApply
$(GRADLE) spotlessApply

.PHONY: release
release: ## Upload artifacts to Sonatype Nexus.
./gradlew --info publish --stacktrace --no-daemon --no-parallel
./gradlew --info releaseRepository
$(GRADLE) --info publish --stacktrace --no-daemon --no-parallel
$(GRADLE) --info releaseRepository

.PHONY: releaselocal
releaselocal: ## Release artifacts to local maven repository.
./gradlew --info publishToMavenLocal
$(GRADLE) --info publishToMavenLocal

.PHONY: test
test: ## Run all tests.
./gradlew test
$(GRADLE) test
Loading