summaryrefslogtreecommitdiff
path: root/chromium/components/policy/android/BUILD.gn
blob: 7399ba209fce3439ab7ec34700c484d3d71e0c77 (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
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/android/rules.gni")

_jni_sources = [
  "java/src/org/chromium/policy/PolicyConverter.java",
  "java/src/org/chromium/policy/CombinedPolicyProvider.java",
]

# GYP: //components/components.gyp:policy_java
android_library("policy_java") {
  deps = [
    "//base:base_java",
  ]
  java_files =
      _jni_sources + [
        "java/src/org/chromium/policy/AbstractAppRestrictionsProvider.java",
        "java/src/org/chromium/policy/AppRestrictionsProvider.java",
        "java/src/org/chromium/policy/PolicyProvider.java",
      ]
}

# GYP: //components/components.gyp:policy_test_support_java
android_library("policy_java_test_support") {
  testonly = true
  deps = [
    ":policy_java",
    "//base:base_java",
    "//base:base_java_test_support",
  ]
  java_files = [
    "javatests/src/org/chromium/policy/test/annotations/Policies.java",
    "javatests/src/org/chromium/policy/test/PolicyData.java",
  ]
}

# GYP: //components/components.gyp:policy_jni_headers
generate_jni("jni_headers") {
  visibility = [ "//components/policy/*" ]
  sources = _jni_sources
  jni_package = "policy"
}

# GYP: //components/components_test.gyp:components_junit_tests
junit_binary("components_policy_junit_tests") {
  java_files = [
    "junit/src/org/chromium/policy/AbstractAppRestrictionsProviderTest.java",
    "junit/src/org/chromium/policy/CombinedPolicyProviderTest.java",
    "junit/src/org/chromium/policy/test/annotations/PoliciesTest.java",
  ]
  deps = [
    ":policy_java",
    ":policy_java_test_support",
    "//base:base_java",
    "//third_party/junit:hamcrest",
  ]
}