[annotations] produce a sources JAR for the infer annotations

Summary:
Some of the new thread-safety annotations are somewhat difficult to understand based on the name alone.
Devs can link a sources JAR with the annotations in their IDE to quickly understand the purpose of each annotation.

Reviewed By: jeremydubreil

Differential Revision: D4451748

fbshipit-source-id: 1ba6060
master
Sam Blackshear 8 years ago committed by Facebook Github Bot
parent add9e476a3
commit 908e78cc81

2
.gitignore vendored

@ -117,7 +117,7 @@ buck-out/
/infer/annotations/annot_classes/
/infer/annotations/annotations.jar
/infer/annotations/processor_classes/
/infer/annotations/annotations-src.jar
infer/src/.project
/dependencies/ocamldot/ocamldot
/dependencies/ocamldot/ocamldot.ml

@ -14,14 +14,19 @@ ANNOT_SOURCES = $(shell find com/facebook/infer/annotation -name "*.java")
ANNOT_CLASSES = 'annot_classes'
ANNOTATIONS_JAR = $(CWD)/annotations.jar
SOURCES_JAR = $(CWD)/annotations-src.jar
all: $(ANNOTATIONS_JAR)
all: $(ANNOTATIONS_JAR) $(SOURCES_JAR)
$(ANNOTATIONS_JAR): $(ANNOT_SOURCES)
mkdir -p $(ANNOT_CLASSES)
javac -source 7 -target 7 -cp $(JSR_JAR) $(ANNOT_SOURCES) -d $(ANNOT_CLASSES)
cd $(ANNOT_CLASSES) && jar cvf $(ANNOTATIONS_JAR) com
$(SOURCES_JAR): $(ANNOT_SOURCES)
jar cvf $(SOURCES_JAR) com
clean:
@rm -rf $(ANNOT_CLASSES)
@rm -f $(ANNOTATIONS_JAR)
@rm -f $(SOURCES_JAR)

Loading…
Cancel
Save