1*5be3f65cSAndroid Build Coastguard Worker#!/bin/sh 2*5be3f65cSAndroid Build Coastguard Worker# Copyright (c) Meta Platforms, Inc. and affiliates. 3*5be3f65cSAndroid Build Coastguard Worker# 4*5be3f65cSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); 5*5be3f65cSAndroid Build Coastguard Worker# you may not use this file except in compliance with the License. 6*5be3f65cSAndroid Build Coastguard Worker# You may obtain a copy of the License at 7*5be3f65cSAndroid Build Coastguard Worker# 8*5be3f65cSAndroid Build Coastguard Worker# http://www.apache.org/licenses/LICENSE-2.0 9*5be3f65cSAndroid Build Coastguard Worker# 10*5be3f65cSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software 11*5be3f65cSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, 12*5be3f65cSAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*5be3f65cSAndroid Build Coastguard Worker# See the License for the specific language governing permissions and 14*5be3f65cSAndroid Build Coastguard Worker# limitations under the License. 15*5be3f65cSAndroid Build Coastguard Worker 16*5be3f65cSAndroid Build Coastguard Workerset -e 17*5be3f65cSAndroid Build Coastguard Worker 18*5be3f65cSAndroid Build Coastguard Worker# Absolute path to this script, e.g. /home/user/ktfmt/smoke_tests.sh 19*5be3f65cSAndroid Build Coastguard WorkerSCRIPT=$(readlink -f "$0") 20*5be3f65cSAndroid Build Coastguard Worker# Absolute path this script is in, thus /home/user/ktfmt/ 21*5be3f65cSAndroid Build Coastguard WorkerROOT_DIR=$(dirname "$SCRIPT") 22*5be3f65cSAndroid Build Coastguard Worker 23*5be3f65cSAndroid Build Coastguard Workerecho "Testing ktfmt core library" 24*5be3f65cSAndroid Build Coastguard Workerecho 25*5be3f65cSAndroid Build Coastguard Workercd "$ROOT_DIR" 26*5be3f65cSAndroid Build Coastguard Workermvn clean install 27*5be3f65cSAndroid Build Coastguard Workerecho 28*5be3f65cSAndroid Build Coastguard Worker 29*5be3f65cSAndroid Build Coastguard Workerecho "Testing ktfmt IDEA plugin" 30*5be3f65cSAndroid Build Coastguard Workerecho 31*5be3f65cSAndroid Build Coastguard Workercd "$ROOT_DIR/ktfmt_idea_plugin" 32*5be3f65cSAndroid Build Coastguard Worker./gradlew :build 33*5be3f65cSAndroid Build Coastguard Workerecho 34*5be3f65cSAndroid Build Coastguard Worker 35*5be3f65cSAndroid Build Coastguard Workerecho "Testing online formatter" 36*5be3f65cSAndroid Build Coastguard Workerecho 37*5be3f65cSAndroid Build Coastguard Workercd "$ROOT_DIR/online_formatter" 38*5be3f65cSAndroid Build Coastguard Worker./gradlew :build 39*5be3f65cSAndroid Build Coastguard Workerecho 40