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

Commit 52197580 authored by Paul Duffin's avatar Paul Duffin
Browse files

Allow the unsupportedappusage-annotation to be used for device variants

Some modules, e.g. libphonenumber-platform, depend on core platform API
solely for accessing the dalvik.annotation.compat.UnsupportedAppUsage
annotation. Building device variants of unsupportedappusage-annotation
will allow those modules to switch to core_current.

Bug: 134379140
Test: m droid
Change-Id: I1634b8ffd2a28c2663defd2a4a4e40d78b174d91
parent 2bba8e7b
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -758,15 +758,22 @@ java_library {
    plugins: ["unsupportedappusage-annotation-processor"],
}

// A host library including just UnsupportedAppUsage.java so that the annotation
// processor can also use this annotation.
java_library_host {
// A library including just UnsupportedAppUsage.java classes.
//
// Provided for target so that libraries can use it without depending on
// the whole of framework or the core platform API.
//
// Built for host so that the annotation processor can also use this annotation.
java_library {
    name: "unsupportedappusage-annotation",
    host_supported: true,
    srcs: [
        "core/java/android/annotation/IntDef.java",
        "core/java/android/annotation/UnsupportedAppUsage.java",
        ":unsupportedappusage_annotation_files",
    ],

    sdk_version: "core_current",
}

// A temporary build target that is conditionally included on the bootclasspath if