Commit 49ee2f78 authored by Florian Lugou's avatar Florian Lugou

fixed problem with gradle version number in Makefile

parent 1ee5a8f5
......@@ -6,15 +6,17 @@ MAKE = make -s
TAR = tar
GZIP = gzip
GRADLE = $(shell which gradle)
ERROR_MSG = echo "$(COLOR)\nBuild with gradle failed. Falling back to basic javac command...\n$(RESET)"
GRADLE_VERSION_NEEDED = 3.5
ERROR_MSG = echo "$(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 basic javac command...\n"
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 "3.5\n$(GRADLE_VERSION)" | sort -V | head -n1)
ifneq "3.5" "$(GRADLE_VERSION_MIN)"
ERROR_MSG = echo "$(COLOR)Gradle $(GRADLE_VERSION) is too old. Needs at least 3.5. Falling back to basic javac command...\n$(RESET)"
GRADLE_VERSION := $(shell $(GRADLE) --version | grep "^Gradle" | awk '{print $$2}')
GRADLE_VERSION_MIN := $(shell echo -e "$(GRADLE_VERSION_NEEDED)\n$(GRADLE_VERSION)" | sort -V | 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
endif
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment