summaryrefslogtreecommitdiff
path: root/tools/lock_agent/Android.bp
blob: cabe1398903e31c5973feb2cd8f4257fa14b5fbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "frameworks_base_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["frameworks_base_license"],
}

cc_library {
    name: "liblockagent",
    host_supported: false,
    srcs: ["agent.cpp"],
    static_libs: [
        "libbase_ndk",
        "slicer_ndk_no_rtti",
    ],
    shared_libs: [
        "libz",  // for slicer (using adler32).
        "liblog",
    ],
    sdk_version: "current",
    stl: "c++_static",
    header_libs: [
        // Use ScopedUtfChars.
        "libnativehelper_header_only",
        "libopenjdkjvmti_headers",
    ],
    compile_multilib: "both",
}

cc_binary_host {
    name: "lockagenttest",
    srcs: ["agent.cpp"],
    static_libs: [
        "libbase",
        "liblog",
        "libz",
        "slicer",
    ],
    header_libs: [
        // Use ScopedUtfChars.
        "libnativehelper_header_only",
        "libopenjdkjvmti_headers",
    ],
}

java_library {
    name: "lockagent",
    srcs: ["java/**/*.java"],
    dex_preopt: {
        enabled: false,
    },
    optimize: {
        enabled: false,
    },
    installable: true,
}

cc_binary {
    name: "lockagent_crasher",
    srcs: ["crasher.cpp"],
    static_libs: ["libbase_ndk"],
    shared_libs: ["liblog"],
    sdk_version: "current",
    stl: "c++_static",
    compile_multilib: "first",
}

sh_binary {
    name: "start_with_lockagent",
    src: "start_with_lockagent.sh",
    required: [
        "liblockagent",
        "lockagent",
        "lockagent_crasher",
    ],
}