buildscript: iterate all example folder and build (#9961)

This commit is contained in:
yifeizhuang 2023-03-17 15:09:58 -07:00 committed by GitHub
parent b8444d563d
commit c1ff4a856d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 22 deletions

View File

@ -64,28 +64,17 @@ if [[ -z "${SKIP_TESTS:-}" ]]; then
# --batch-mode reduces log spam
mvn verify --batch-mode
popd
pushd examples/example-alts
../gradlew build $GRADLE_FLAGS
popd
pushd examples/example-hostname
../gradlew build $GRADLE_FLAGS
mvn verify --batch-mode
popd
pushd examples/example-tls
../gradlew build $GRADLE_FLAGS
mvn verify --batch-mode
popd
pushd examples/example-jwt-auth
../gradlew build $GRADLE_FLAGS
mvn verify --batch-mode
popd
pushd examples/example-xds
../gradlew build $GRADLE_FLAGS
popd
for f in examples/example-*
do
pushd "$f"
../gradlew build $GRADLE_FLAGS
if [ -f "pom.xml" ]; then
# --batch-mode reduces log spam
mvn verify --batch-mode
fi
popd
done
# TODO(zpencer): also build the GAE examples
pushd examples/example-orca
../gradlew build $GRADLE_FLAGS
popd
fi
LOCAL_MVN_TEMP=$(mktemp -d)

View File

@ -23,7 +23,7 @@ dependencies {
"io.grpc:grpc-servlet:${grpcVersion}",
"io.grpc:grpc-stub:${grpcVersion}"
providedImplementation "javax.servlet:javax.servlet-api:4.0.1",
compileOnly "javax.servlet:javax.servlet-api:4.0.1",
"org.apache.tomcat:annotations-api:6.0.53"
}