mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 14:52:13 -04:00
CI to check kotlin version
This commit is contained in:
parent
1d31abe51c
commit
53ae91dbea
4
.github/workflows/pull_request.yml
vendored
4
.github/workflows/pull_request.yml
vendored
@ -47,6 +47,10 @@ jobs:
|
||||
- name: Install NDK
|
||||
run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;22.0.7026061" --sdk_root=${ANDROID_SDK_ROOT}
|
||||
|
||||
- name: Building Kotlin Report
|
||||
run: bash contrib/kotlin-validator.sh
|
||||
|
||||
|
||||
- name: Build all configurations
|
||||
run: ./gradlew assemble
|
||||
|
||||
|
49
contrib/kotlin-validator.sh
Normal file
49
contrib/kotlin-validator.sh
Normal file
@ -0,0 +1,49 @@
|
||||
#
|
||||
# Kiwix Android
|
||||
# Copyright (c) 2022 Kiwix <android.kiwix.org>
|
||||
# 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/>.
|
||||
#
|
||||
#
|
||||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# Kiwix Android
|
||||
# Copyright (c) 2022 Kiwix <android.kiwix.org>
|
||||
# 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/>.
|
||||
#
|
||||
#
|
||||
|
||||
if ./gradlew buildKotlinToolingMetadata; then
|
||||
version=$(cat app/build/kotlinToolingMetadata/kotlin-tooling-metadata.json | tr { '\n' | tr , '\n' | tr } '\n' | grep "buildPluginVersion" | awk -F'"' '{print $4}')
|
||||
if [ $version == "1.7.0" ];
|
||||
then
|
||||
echo "Build System is using kotlin version 1.7.0"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
exit 1
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user