• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2025 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15//
16
17package {
18    default_applicable_licenses: ["external_tink_java_license"],
19}
20
21license {
22    name: "external_tink_java_license",
23    visibility: [":__subpackages__"],
24    license_kinds: [
25        "SPDX-license-identifier-Apache-2.0",
26    ],
27    license_text: [
28        "LICENSE",
29    ],
30}
31
32java_library {
33    name: "tink_proto_lite",
34    proto: {
35        type: "lite",
36        canonical_path_from_root: false,
37    },
38    srcs: ["proto/*.proto"],
39    visibility: ["//visibility:private"],
40}
41
42java_library_static {
43    name: "tink-java",
44
45    visibility: ["//vendor:__subpackages__"],
46
47    srcs: [
48        "src_android/main/**/*.java",
49        "src/main/**/*.java",
50    ],
51    exclude_srcs: [
52        "src_android/main/java/com/google/crypto/tink/internal/testing/**/*.java",
53        "src/main/java/com/google/crypto/tink/config/internal/TinkFipsEnabled.java", // Disable fips
54        "src/main/java/com/google/crypto/tink/internal/BuildDispatchedCode.java", // Default to src_android
55        "src/main/java/com/google/crypto/tink/prf/internal/AesCmacPrfWycheproofTestUtil.java",
56        "src/main/java/com/google/crypto/tink/testing/**/*.java",
57        "src/main/java/com/google/crypto/tink/util/KeysDownloader.java",
58    ],
59    static_libs: [
60        "androidx.annotation_annotation",
61        "error_prone_annotations",
62        "gson",
63        "jsr305",
64        "tink_proto_lite",
65        "truth",
66    ],
67
68    errorprone: {
69        javacflags: [
70            "-Xep:FormatStringAnnotation:WARN",
71            "-Xep:NoCanIgnoreReturnValueOnClasses:WARN",
72        ],
73    },
74}
75