<commit_before>#!/bin/bash

set -exu -o pipefail
cat /VERSION

BASE_DIR="$(pwd)"

# Install gRPC and codegen for the Android examples
# (a composite gradle build can't find protoc-gen-grpc-java)

cd "$BASE_DIR/github/grpc-java"

export GRADLE_OPTS=-Xmx512m
export LDFLAGS=-L/tmp/protobuf/lib
export CXXFLAGS=-I/tmp/protobuf/include
export LD_LIBRARY_PATH=/tmp/protobuf/lib
export OS_NAME=$(uname)

echo y | ${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;28.0.3"

# Proto deps
buildscripts/make_dependencies.sh

./gradlew publishToMavenLocal

# Build grpc-cronet

pushd cronet
../gradlew build
popd

# Build grpc-android

pushd android
../gradlew build
popd

# Build examples

cd ./examples/android/clientcache
../../gradlew build
cd ../routeguide
../../gradlew build
cd ../helloworld
../../gradlew build

cd "$BASE_DIR/github/grpc-java/examples/example-kotlin/android/helloworld/"
../../../gradlew build

# Skip APK size and dex count comparisons for non-PR builds<commit_msg>buildscripts: add android-interop-test build (without runing test) in kokoro android<commit_after>#!/bin/bash

set -exu -o pipefail
cat /VERSION

BASE_DIR="$(pwd)"

# Install gRPC and codegen for the Android examples
# (a composite gradle build can't find protoc-gen-grpc-java)

cd "$BASE_DIR/github/grpc-java"

export GRADLE_OPTS=-Xmx512m
export LDFLAGS=-L/tmp/protobuf/lib
export CXXFLAGS=-I/tmp/protobuf/include
export LD_LIBRARY_PATH=/tmp/protobuf/lib
export OS_NAME=$(uname)

echo y | ${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;28.0.3"

# Proto deps
buildscripts/make_dependencies.sh

./gradlew publishToMavenLocal

# Build grpc-cronet

pushd cronet
../gradlew build
popd

# Build grpc-android

pushd android
../gradlew build
popd

# Build android-interop-testing
pushd android-interop-testing
../gradlew build
popd

# Build examples

cd ./examples/android/clientcache
../../gradlew build
cd ../routeguide
../../gradlew build
cd ../helloworld
../../gradlew build

cd "$BASE_DIR/github/grpc-java/examples/example-kotlin/android/helloworld/"
../../../gradlew build

# Skip APK size and dex count comparisons for non-PR builds
{'fraction_non_alphanumeric': 0.1291390728476821, 'fraction_numerical': 0.006622516556291391, 'mean_word_length': 4.011848341232228, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2860838', 'n_tokens_mistral': 778, 'n_tokens_neox': 724, 'n_words': 187}