Skip to content
Snippets Groups Projects
Commit 330b042e authored by Florian Lugou's avatar Florian Lugou
Browse files

fixed bug with gradle version in Makefile

parent ae406992
No related branches found
No related tags found
No related merge requests found
...@@ -7,14 +7,14 @@ TAR = tar ...@@ -7,14 +7,14 @@ TAR = tar
GZIP = gzip GZIP = gzip
GRADLE = $(shell which gradle) GRADLE = $(shell which gradle)
GRADLE_VERSION_NEEDED = 3.3 GRADLE_VERSION_NEEDED = 3.3
ERROR_MSG = echo "$(COLOR)\nBuild with gradle failed. Falling back to regular javac command...\n$(RESET)" ERROR_MSG = echo -e "$(COLOR)\nBuild with gradle failed. Falling back to regular javac command...\n$(RESET)"
ifeq "$(GRADLE)" "" ifeq "$(GRADLE)" ""
ERROR_MSG = echo "Gradle was not found. Falling back to regular javac command...\n" ERROR_MSG = echo "Gradle was not found. Falling back to regular javac command...\n"
GRADLE = false && echo >/dev/null GRADLE = false && echo >/dev/null
else else
GRADLE_VERSION := $(shell $(GRADLE) --version | grep "^Gradle" | awk '{print $$2}') GRADLE_VERSION := $(shell $(GRADLE) --version | grep "^Gradle" | awk '{print $$2}')
GRADLE_VERSION_MIN := $(shell echo "$(GRADLE_VERSION_NEEDED)\n$(GRADLE_VERSION)" | sort -V 2>/dev/null | head -n1) GRADLE_VERSION_MIN := $(shell echo -e "$(GRADLE_VERSION_NEEDED)\n$(GRADLE_VERSION)" | sort -V 2>/dev/null | head -n1)
ifneq "$(GRADLE_VERSION_NEEDED)" "$(GRADLE_VERSION_MIN)" ifneq "$(GRADLE_VERSION_NEEDED)" "$(GRADLE_VERSION_MIN)"
ERROR_MSG = echo "$(COLOR)Gradle $(GRADLE_VERSION) is too old. Needs at least $(GRADLE_VERSION_NEEDED). Falling back to regular javac command...\n$(RESET)" ERROR_MSG = echo "$(COLOR)Gradle $(GRADLE_VERSION) is too old. Needs at least $(GRADLE_VERSION_NEEDED). Falling back to regular javac command...\n$(RESET)"
GRADLE = false && echo >/dev/null GRADLE = false && echo >/dev/null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment