#!/bin/bash
#-------------------------------------------------------------------------------
# Copyright (C) 2015-2018 Andreas Redmer <ar-appleflinger@abga.be>
# 
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------
./licensecheck.sh || exit 1
./validateI18N.sh || exit 1

# ensure it builds
ANDROID_HOME=~/devel/android-sdk-linux/ ./gradlew assembleRelease || exit 1

# run tests
./gradlew tests:test --info || exit 1

# validating images (no transparent pixels) - takes a long time but rarely fails, so it is performed last
scripts/validate-images.sh || exit 1
