Third-Party Import of: https://github.com/tink-crypto/tink-java Request Document: go/android3p For CL Reviewers: go/android3p#reviewing-a-cl For Build Team: go/ab-third-party-imports Bug: http://b/395909261 Original import of the code can be found at: https://googleplex-android.googlesource.com/platform/external/tink-java/+/refs/heads/third-party-review. Security Questionnaire: http://b/395909261#comment1 Test: Manual testing Change-Id: Idad8d9193c589ce32c8894958a6324f0a99f0449
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..50a6a2f --- /dev/null +++ b/Android.bp
@@ -0,0 +1,74 @@ +// Copyright (C) 2025 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// + +package { + default_applicable_licenses: ["external_tink_java_license"], +} + +license { + name: "external_tink_java_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + ], + license_text: [ + "LICENSE", + ], +} + +java_library { + name: "tink_proto_lite", + proto: { + type: "lite", + canonical_path_from_root: false, + }, + srcs: ["proto/*.proto"], + visibility: ["//visibility:private"], +} + +java_library_static { + name: "tink-java", + + visibility: ["//vendor:__subpackages__"], + + srcs: [ + "src_android/main/**/*.java", + "src/main/**/*.java", + ], + exclude_srcs: [ + "src_android/main/java/com/google/crypto/tink/internal/testing/**/*.java", + "src/main/java/com/google/crypto/tink/config/internal/TinkFipsEnabled.java", // Disable fips + "src/main/java/com/google/crypto/tink/internal/BuildDispatchedCode.java", // Default to src_android + "src/main/java/com/google/crypto/tink/prf/internal/AesCmacPrfWycheproofTestUtil.java", + "src/main/java/com/google/crypto/tink/testing/**/*.java", + "src/main/java/com/google/crypto/tink/util/KeysDownloader.java", + ], + static_libs: [ + "androidx.annotation_annotation", + "error_prone_annotations", + "gson", + "jsr305", + "tink_proto_lite", + "truth", + ], + + errorprone: { + javacflags: [ + "-Xep:FormatStringAnnotation:WARN", + "-Xep:NoCanIgnoreReturnValueOnClasses:WARN", + ], + }, +}
diff --git a/METADATA b/METADATA new file mode 100644 index 0000000..fe9b190 --- /dev/null +++ b/METADATA
@@ -0,0 +1,15 @@ +name: "tink-java" +description: + "Tink library for Java" + +third_party { + identifier { + type: "Git" + value: "https://github.com/tink-crypto/tink-java" + primary_source: true + version: "v1.16.0" + } + version: "v1.16.0" + last_upgrade_date { year: 2025 month: 2 day: 18 } + license_type: NOTICE +}
diff --git a/MODULE_LICENSE_APACHE2 b/MODULE_LICENSE_APACHE2 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/MODULE_LICENSE_APACHE2
diff --git a/OWNERS b/OWNERS new file mode 100644 index 0000000..2e8f086 --- /dev/null +++ b/OWNERS
@@ -0,0 +1 @@ +include platform/system/core:main:/janitors/OWNERS