Skip to content

Commit decedce

Browse files
committed
Add Kokoro config
1 parent 1df7a12 commit decedce

File tree

4 files changed

+67
-0
lines changed

4 files changed

+67
-0
lines changed

build.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
3+
#
4+
# Copyright 2022 The Android Open Source Project
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
# IGNORE this file, it's only used in the internal Google release process
20+
# Fail on any error.
21+
set -e
22+
23+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
24+
APP_OUT=$DIR/app/build/outputs
25+
26+
# This script assembles the release build of the Android application.
27+
# Ensure gradlew is executable
28+
chmod +x ./gradlew
29+
30+
# Clean the project (optional, but good for a fresh release build)
31+
echo "Cleaning the project..."
32+
./gradlew clean
33+
34+
# Assemble the release build
35+
echo "Assembling the release build..."
36+
./gradlew app:bundleRelease
37+
38+
# Check if the build was successful
39+
if [ $? -eq 0 ]; then
40+
echo "Build successful! The APK/AAB can be found in app/build/outputs/"
41+
else
42+
echo "Build failed. Please check the console output for errors."
43+
exit 1
44+
fi
45+
46+
exit 0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build_file: "androidify/kokoro/gcp_ubuntu_docker/kokoro_build.sh"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# Fail on any error.
4+
set -e
5+
6+
# Display commands being run.
7+
# WARNING: please only enable 'set -x' if necessary for debugging, and be very
8+
# careful if you handle credentials (e.g. from Keystore) with 'set -x':
9+
# statements like "export VAR=$(cat /tmp/keystore/credentials)" will result in
10+
# the credentials being printed in build logs.
11+
# Additionally, recursive invocation with credentials as command-line
12+
# parameters, will print the full command, with credentials, in the build logs.
13+
# set -x
14+
15+
# Code under repo is checked out to ${KOKORO_ARTIFACTS_DIR}/github.
16+
# The final directory name in this path is determined by the scm name specified
17+
# in the job configuration.
18+
cd "${KOKORO_ARTIFACTS_DIR}/github/androidify"
19+
./build.sh
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build_file: "kokoro-codelab-riggaroo/kokoro/gcp_ubuntu_docker/kokoro_build.sh"

0 commit comments

Comments
 (0)