blob: 501891c874be89281c920a8f842ff79a27f28d40 [file] [log] [blame]
Adam Vartanian9ae0b402017-03-08 16:39:31 +00001#!/usr/bin/env bash
2#
3# Updates the crypto support JSON data file by running the appropriate tools.
4
5# Ensure that the files we need are in the place we expect
6if [ ! -f libcore/tools/docs/crypto/src/java/libcore/java/security/ListProviders.java -o ! -f libcore/tools/docs/crypto/data/crypto_support.json ]; then
7 echo "This command must be run from the repo root."
8 exit 1
9fi
10
11if [ -z "$1" ]; then
12 echo "The current API level must be specified as an argument."
13 exit 1
14fi
15
Adam Vartanian22051132017-05-04 12:11:30 +010016make -j48 vogar dx
Adam Vartanian53bdc732017-03-14 13:23:46 +000017vogar --mode=activity --toolchain=jdk --multidex=false libcore/tools/docs/crypto/src/java/libcore/java/security/ListProviders.java | libcore/tools/docs/crypto/update_crypto_support.py --api_level=$1 --rewrite_file libcore/tools/docs/crypto/data/crypto_support.json