blob: 706bfb32d25f739cc11da6d99d5bcb5dfc61e0ff [file] [log] [blame]
//
// Copyright (C) 2010 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.
//
// These cannot build in the PDK, because the PDK requires all libraries
// compile against SDK versions.
java_defaults {
name: "bouncycastle-defaults",
host_supported: true,
hostdex: true,
target: {
android: {
product_variables: {
pdk: {
enabled: false,
},
},
},
},
}
// non-jarjar version to build okhttp-tests
java_library_static {
name: "bouncycastle-nojarjar",
defaults: ["bouncycastle-defaults"],
srcs: ["bcprov/src/main/java/**/*.java"],
exclude_srcs: [
"bcprov/src/main/java/org/bouncycastle/asn1/ocsp/**/*.java",
],
target: {
android: {
// used for bouncycastle for target where we want to be sure to use OpenSSLDigest
exclude_srcs: [
"bcprov/src/main/java/org/bouncycastle/crypto/digests/AndroidDigestFactoryBouncyCastle.java",
],
},
host: {
// used for bouncycastle for host where we can't use OpenSSLDigest
exclude_srcs: [
"bcprov/src/main/java/org/bouncycastle/crypto/digests/AndroidDigestFactoryOpenSSL.java",
"bcprov/src/main/java/org/bouncycastle/crypto/digests/OpenSSLDigest.java",
],
},
},
libs: ["conscrypt"],
no_framework_libs: true,
java_version: "1.7",
}
java_library {
name: "bouncycastle",
defaults: ["bouncycastle-defaults"],
static_libs: ["bouncycastle-nojarjar"],
libs: ["conscrypt"],
no_framework_libs: true,
java_version: "1.7",
target: {
android: {
jarjar_rules: "jarjar-rules.txt",
},
},
}
// A guaranteed unstripped version of bouncycastle.
// The build system may or may not strip the bouncycastle jar, but this one will
// not be stripped. See b/24535627.
java_library {
name: "bouncycastle-testdex",
defaults: ["bouncycastle-defaults"],
static_libs: ["bouncycastle-nojarjar"],
libs: ["conscrypt"],
no_framework_libs: true,
jarjar_rules: "jarjar-rules.txt",
java_version: "1.7",
}
// unbundled bouncycastle jar
java_library_static {
name: "bouncycastle-unbundled",
sdk_version: "9",
srcs: ["bcprov/src/main/java/**/*.java"],
exclude_srcs: [
"bcprov/src/main/java/org/bouncycastle/asn1/ocsp/**/*.java",
"bcprov/src/main/java/org/bouncycastle/crypto/digests/AndroidDigestFactoryOpenSSL.java",
"bcprov/src/main/java/org/bouncycastle/crypto/digests/OpenSSLDigest.java",
],
}
// PKIX classes used for testing
java_library_static {
name: "bouncycastle-bcpkix-nojarjar",
defaults: ["bouncycastle-defaults"],
srcs: ["bcpkix/src/main/java/**/*.java"],
exclude_srcs: ["bcpkix/src/main/java/org/bouncycastle/cert/ocsp/**/*.java"],
no_framework_libs: true,
libs: [
"bouncycastle-nojarjar",
"conscrypt",
],
}
java_library_static {
name: "bouncycastle-bcpkix",
defaults: ["bouncycastle-defaults"],
static_libs: ["bouncycastle-bcpkix-nojarjar"],
libs: ["conscrypt"],
no_framework_libs: true,
target: {
android: {
jarjar_rules: "jarjar-rules.txt",
},
},
}
// OCSP classes used for testing
java_library_static {
name: "bouncycastle-ocsp-nojarjar",
defaults: ["bouncycastle-defaults"],
srcs: [
"bcpkix/src/main/java/org/bouncycastle/cert/ocsp/**/*.java",
"bcprov/src/main/java/org/bouncycastle/asn1/ocsp/**/*.java",
],
no_framework_libs: true,
libs: [
"bouncycastle-nojarjar",
"bouncycastle-bcpkix-nojarjar",
"conscrypt",
],
}
java_library_static {
name: "bouncycastle-ocsp",
defaults: ["bouncycastle-defaults"],
static_libs: ["bouncycastle-ocsp-nojarjar"],
jarjar_rules: "jarjar-rules.txt",
java_version: "1.7",
no_framework_libs: true,
}
// For compatibilityy with old bouncycastle-host and bouncycastle-bcpkix-host names
java_library_host {
name: "bouncycastle-host",
static_libs: ["bouncycastle"],
}
java_library_host {
name: "bouncycastle-bcpkix-host",
static_libs: ["bouncycastle-bcpkix"],
}