diff options
-rw-r--r-- | Android.bp | 35 | ||||
-rw-r--r-- | Android.mk | 42 |
2 files changed, 35 insertions, 42 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..39af2a6 --- /dev/null +++ b/Android.bp @@ -0,0 +1,35 @@ +java_library_host { + name: "desugar", + srcs: ["java/**/*.java"], + // Remove com.google.devtools.common.options.testing classes, they are + // extensions to the Truth library that we are missing dependencies for + // and don't need. + // Also remove com.google.devtools.common.options.InvocationPolicy*, + // which depend on protobuf and are not used in desugar. + exclude_srcs: [ + "java/com/google/devtools/common/options/testing/**/*.java", + "java/com/google/devtools/common/options/InvocationPolicyEnforcer.java", + "java/com/google/devtools/common/options/InvocationPolicyParser.java", + ], + + manifest: "manifest.txt", + static_libs: [ + "asm-6.0_BETA", + "asm-commons-6.0_BETA", + "asm-tree-6.0_BETA", + "error_prone_annotations-2.0.18", + "guava-21.0", + "jsr305-3.0.1", + ], + + // Required for use of javax.annotation.Generated per http://b/62050818 + javacflags: ["-J--add-modules=java.xml.ws.annotation"], + + // Use Dagger2 annotation processor + annotation_processors: ["dagger2-auto-value-host"], + libs: ["dagger2-auto-value-host"], + // b/25860419: annotation processors must be explicitly specified for grok + annotation_processor_classes: [ + "com.google.auto.value.processor.AutoValueProcessor", + ], +} diff --git a/Android.mk b/Android.mk deleted file mode 100644 index dc35546..0000000 --- a/Android.mk +++ /dev/null @@ -1,42 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -desugar_src_files := $(call all-java-files-under, java) - -# Remove com.google.devtools.common.options.testing classes, they are -# extensions to the Truth library that we are missing dependencies for -# and don't need. -# Also remove com.google.devtools.common.options.InvocationPolicy*, -# which depend on protobuf and are not used in desugar. -desugar_src_files := $(filter-out \ - $(call all-java-files-under, java/com/google/devtools/common/options/testing) \ - java/com/google/devtools/common/options/InvocationPolicyEnforcer.java \ - java/com/google/devtools/common/options/InvocationPolicyParser.java \ - , $(desugar_src_files)) - -include $(CLEAR_VARS) -LOCAL_MODULE := desugar -LOCAL_SRC_FILES := $(desugar_src_files) - -LOCAL_JAR_MANIFEST := manifest.txt -LOCAL_STATIC_JAVA_LIBRARIES := \ - asm-6.0_BETA \ - asm-commons-6.0_BETA \ - asm-tree-6.0_BETA \ - error_prone_annotations-2.0.18 \ - guava-21.0 \ - jsr305-3.0.1 \ - dagger2-auto-value-host \ - -LOCAL_MODULE_CLASS := JAVA_LIBRARIES -LOCAL_IS_HOST_MODULE := true -# Required for use of javax.annotation.Generated per http://b/62050818 -LOCAL_JAVACFLAGS := $(if $(EXPERIMENTAL_USE_OPENJDK9),-J--add-modules=java.xml.ws.annotation,) - -# Use Dagger2 annotation processor -# b/25860419: annotation processors must be explicitly specified for grok -LOCAL_ANNOTATION_PROCESSORS := dagger2-auto-value-host -LOCAL_ANNOTATION_PROCESSOR_CLASSES := com.google.auto.value.processor.AutoValueProcessor - -include $(BUILD_HOST_JAVA_LIBRARY) - -desugar_src_files := |