1*4e4b8e58SAndroid Build Coastguard Worker#!/bin/bash 2*4e4b8e58SAndroid Build Coastguard Worker# Copyright (C) 2018 The Android Open Source Project 3*4e4b8e58SAndroid Build Coastguard Worker# 4*4e4b8e58SAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); 5*4e4b8e58SAndroid Build Coastguard Worker# you may not use this file except in compliance with the License. 6*4e4b8e58SAndroid Build Coastguard Worker# You may obtain a copy of the License at 7*4e4b8e58SAndroid Build Coastguard Worker# 8*4e4b8e58SAndroid Build Coastguard Worker# http://www.apache.org/licenses/LICENSE-2.0 9*4e4b8e58SAndroid Build Coastguard Worker# 10*4e4b8e58SAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software 11*4e4b8e58SAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, 12*4e4b8e58SAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*4e4b8e58SAndroid Build Coastguard Worker# See the License for the specific language governing permissions and 14*4e4b8e58SAndroid Build Coastguard Worker# limitations under the License. 15*4e4b8e58SAndroid Build Coastguard Worker 16*4e4b8e58SAndroid Build Coastguard Workerif [[ -z "${ANDROID_BUILD_TOP}" ]]; then 17*4e4b8e58SAndroid Build Coastguard Worker echo "Missing environment variables. Did you run build/envsetup.sh and lunch?" >&2 18*4e4b8e58SAndroid Build Coastguard Worker exit 1 19*4e4b8e58SAndroid Build Coastguard Workerfi 20*4e4b8e58SAndroid Build Coastguard Worker 21*4e4b8e58SAndroid Build Coastguard WorkerPROJECT_DIR=external/bouncycastle 22*4e4b8e58SAndroid Build Coastguard Worker 23*4e4b8e58SAndroid Build Coastguard WorkerPACKAGE_TRANSFORMATIONS="\ 24*4e4b8e58SAndroid Build Coastguard Worker org.bouncycastle:com.android.org.bouncycastle \ 25*4e4b8e58SAndroid Build Coastguard Worker" 26*4e4b8e58SAndroid Build Coastguard Worker 27*4e4b8e58SAndroid Build Coastguard WorkerMODULE_DIRS="\ 28*4e4b8e58SAndroid Build Coastguard Worker bcprov \ 29*4e4b8e58SAndroid Build Coastguard Worker" 30*4e4b8e58SAndroid Build Coastguard WorkerDEFAULT_CONSTRUCTORS_FILE=${BOUNCY_CASTLE_DIR}/srcgen/default-constructors.txt 31*4e4b8e58SAndroid Build Coastguard Worker 32*4e4b8e58SAndroid Build Coastguard WorkerSOURCE_DIRS="\ 33*4e4b8e58SAndroid Build Coastguard Worker src/main/java \ 34*4e4b8e58SAndroid Build Coastguard Worker src/test/java \ 35*4e4b8e58SAndroid Build Coastguard Worker" 36*4e4b8e58SAndroid Build Coastguard Worker 37*4e4b8e58SAndroid Build Coastguard Worker# Repackage the project's source. 38*4e4b8e58SAndroid Build Coastguard Workersource ${ANDROID_BUILD_TOP}/tools/currysrc/scripts/repackage-common.sh 39*4e4b8e58SAndroid Build Coastguard Worker 40*4e4b8e58SAndroid Build Coastguard Worker# Remove some unused source files: 41*4e4b8e58SAndroid Build Coastguard Workerrm -fr ${REPACKAGED_DIR}/bcprov/src/main/java/com/android/org/bouncycastle/asn1/ocsp/ 42*4e4b8e58SAndroid Build Coastguard Worker 43