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

fixed bug with gradle version in Makefile with printf this time

parent 330b042e
Branches
No related tags found
No related merge requests found
......@@ -7,14 +7,14 @@ TAR = tar
GZIP = gzip
GRADLE = $(shell which gradle)
GRADLE_VERSION_NEEDED = 3.3
ERROR_MSG = echo -e "$(COLOR)\nBuild with gradle failed. Falling back to regular javac command...\n$(RESET)"
ERROR_MSG = printf "$(COLOR)\nBuild with gradle failed. Falling back to regular javac command...\n$(RESET)"
ifeq "$(GRADLE)" ""
ERROR_MSG = echo "Gradle was not found. Falling back to regular javac command...\n"
GRADLE = false && echo >/dev/null
else
GRADLE_VERSION := $(shell $(GRADLE) --version | grep "^Gradle" | awk '{print $$2}')
GRADLE_VERSION_MIN := $(shell echo -e "$(GRADLE_VERSION_NEEDED)\n$(GRADLE_VERSION)" | sort -V 2>/dev/null | head -n1)
GRADLE_VERSION_MIN := $(shell printf "%s\n%s\n" "$(GRADLE_VERSION_NEEDED)" "$(GRADLE_VERSION)" | sort -V 2>/dev/null | head -n1)
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)"
GRADLE = false && echo >/dev/null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment