Bug 923306 - Build annotationProcessors with JAVA_JAR_TARGETS. r=glandium

This commit is contained in:
Nick Alexander 2013-10-09 17:05:37 -07:00
parent 5b68497f5a
commit 8e6abd287d
4 changed files with 35 additions and 13 deletions

View File

@ -0,0 +1,25 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAVA_JAR_TARGETS += annotationProcessors
annotationProcessors_DEST := annotationProcessors.jar
annotationProcessors_JAVAFILES := \
AnnotationProcessor.java \
CodeGenerator.java \
MethodWithAnnotationInfo.java \
classloader/IterableJarLoadingURLClassLoader.java \
classloader/JarClassIterator.java \
utils/AlphabeticMethodComparator.java \
utils/GeneratableEntryPointIterator.java \
utils/Utils.java \
$(NULL)
include $(topsrcdir)/config/rules.mk
JAVA_CLASSPATH := $(ANDROID_SDK)/android.jar
# Include Android specific java flags, instead of what's in rules.mk.
include $(topsrcdir)/config/android-common.mk
libs:: annotationProcessors.jar

View File

@ -0,0 +1,5 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -13,6 +13,7 @@ if CONFIG['OS_TARGET'] == 'Android' and not CONFIG['MOZ_ANDROID_LIBSTDCXX']:
DIRS += ['stlport']
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
DIRS += ['annotationProcessors']
TEST_DIRS += [
'mobile/sutagent/android',
'mobile/sutagent/android/watcher',

View File

@ -1335,20 +1335,11 @@ jni-stubs.inc: jars/gecko-browser.jar jars/gecko-mozglue.jar jars/gecko-util.jar
$(JAVAH) -o javah.out -bootclasspath $(JAVA_BOOTCLASSPATH) -classpath $(subst $(NULL) $(NULL),:,$^) $(CLASSES_WITH_JNI)
$(PYTHON) $(topsrcdir)/mobile/android/base/jni-generator.py javah.out $@
ANNOTATION_PROCESSOR_JAVA_FILES = \
build/annotationProcessors/AnnotationProcessor.java \
build/annotationProcessors/CodeGenerator.java \
build/annotationProcessors/MethodWithAnnotationInfo.java \
build/annotationProcessors/classloader/IterableJarLoadingURLClassLoader.java \
build/annotationProcessors/classloader/JarClassIterator.java \
build/annotationProcessors/utils/AlphabeticMethodComparator.java \
build/annotationProcessors/utils/GeneratableEntryPointIterator.java \
build/annotationProcessors/utils/Utils.java \
$(NULL)
ANNOTATION_PROCESSOR_JAR_FILES := $(DEPTH)/build/annotationProcessors/annotationProcessors.jar
GeneratedJNIWrappers.cpp: jars/gecko-browser.jar jars/gecko-mozglue.jar jars/gecko-util.jar jars/sync-thirdparty.jar
$(JAVAC) $(addprefix $(topsrcdir)/,$(ANNOTATION_PROCESSOR_JAVA_FILES)) -d $(CURDIR)
$(JAVA) -classpath $(JAVA_BOOTCLASSPATH):$(CURDIR) org.mozilla.gecko.annotationProcessors.AnnotationProcessor $^
GeneratedJNIWrappers.cpp: $(ANNOTATION_PROCESSOR_JAR_FILES)
GeneratedJNIWrappers.cpp: $(ALL_JARS)
$(JAVA) -classpath $(JAVA_BOOTCLASSPATH):$(ANNOTATION_PROCESSOR_JAR_FILES) org.mozilla.gecko.annotationProcessors.AnnotationProcessor $(ALL_JARS)
PP_RES_XML= \
$(SYNC_PP_RES_XML) \