Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 809735e7 authored by nuclearmistake's avatar nuclearmistake Committed by Steve Kondik
Browse files

Colorize javac errors



You know those multi-line ones that are frequently interspersed with other buld output?
The ones that don't even have the word "error" in them to search for?

This makes them red.

ps2: fix jar_check failures cause by leaving empty stderr files in intermediates dirs
     this is probably not the best place to store stderr before colorizing it if javac
     exits non-zero, but it seems much lighter than mkdiring a bunch of temp directories
     or using sed to mangle the paths to point to per-intermediates directory unique
     temporary file names

Change-Id: I3b9b7d8a0c76958588ac1603b6742987d6dde54c
Signed-off-by: default avatarnuclearmistake <nuclearmistake@gmail.com>
parent 37f2f2fb
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -1587,7 +1587,11 @@ $(hide) if [ -s $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq ] ; the
    -extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR) \
    $(PRIVATE_JAVACFLAGS) \
    \@$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq \
    || ( rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR) ; exit 41 ) \
    2>$(PRIVATE_CLASS_INTERMEDIATES_DIR)/stderr \
    && rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/stderr \
    || ( if [ -e $(PRIVATE_CLASS_INTERMEDIATES_DIR)/stderr ]; then \
    echo -e ${CL_RED}"`cat $(PRIVATE_CLASS_INTERMEDIATES_DIR)/stderr`"${CL_RST} 1>&2; \
    fi; rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR); exit 41 ) \
fi
$(if $(PRIVATE_JAVA_LAYERS_FILE), $(hide) build/tools/java-layers.py \
    $(PRIVATE_JAVA_LAYERS_FILE) \@$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq,)
@@ -1648,7 +1652,11 @@ $(hide) if [ -s $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq ] ; the
    -extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR) \
    $(PRIVATE_JAVACFLAGS) \
    \@$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq \
    || ( exit 41 ) \
    2>$(PRIVATE_CLASS_INTERMEDIATES_DIR)/stderr \
    && rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/stderr \
    || ( if [ -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/stderr ]; then \
    echo -e ${CL_RED}"`cat $(PRIVATE_CLASS_INTERMEDIATES_DIR)/stderr`"${CL_RST} 1>&2; \
    fi; exit 41 ) \
fi
$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list
$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
@@ -1977,8 +1985,9 @@ endif
###########################################################
## Commands to call Proguard
###########################################################
@echo -e ${CL_CYN}"Copying:"${CL_RST}" $@"
@echo -e ${CL_GRN}"Proguard:"${CL_RST}" $@"
define transform-jar-to-proguard
@echo Proguard: $@
$(hide) $(PROGUARD) -injars $< -outjars $@ $(PRIVATE_PROGUARD_FLAGS) \
    $(addprefix -injars , $(PRIVATE_EXTRA_INPUT_JAR))
endef