Files
qt5/coin/provisioning/common/linux/gradle.sh
Assam Boudjelthia 73fa80bab8 Provisioning: expand Android gradle cache project
Add an :app and :lib modules so both com.android.application
and com.android.library paths are exercised, and add a Kotlin
source + JUnit test in each module. This makes gradlew build
pull the kotlin toolchain jars (compiler-embeddable, reflect,
coroutines) that Qt Android JAR and app builds could need
later. This way we ensure all possible artifacts are made
available in the cache during provisioning and avoid or at
least reduce the chances or later downloads.

Task-number: QTBUG-132915
Change-Id: Ic518f96370ffc40f921bcb3063257f8663e41615
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2026-04-27 20:14:23 +00:00

27 lines
1.0 KiB
Bash

#!/usr/bin/env bash
# Copyright (C) 2026 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
set -ex
# shellcheck source=../unix/DownloadURL.sh
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
# shellcheck source=../unix/SourceEnvVars.sh
source "${BASH_SOURCE%/*}/../unix/SourceEnvVars.sh"
echo "Caching Gradle distribution and dependencies"
gradleCacheFileName="gradle_9.3.1_linux_cache_v2.tar.gz"
gradleCacheUrl="http://ci-files01-hki.ci.qt.io/input/gradle/$gradleCacheFileName"
gradleCacheSha1="e88989d55f68e978442e567e4707a6093c829af6"
gradleCacheFile="/tmp/$gradleCacheFileName"
DownloadURL "$gradleCacheUrl" "$gradleCacheUrl" "$gradleCacheSha1" "$gradleCacheFile"
mkdir -p "$HOME/.gradle"
tar -xzf "$gradleCacheFile" -C "$HOME/.gradle" --strip-components=1
rm "$gradleCacheFile"
gradle_project_source="${BASH_SOURCE%/*}/../shared/gradle/project"
cp -r "$gradle_project_source" /tmp/gradle_project
cd /tmp/gradle_project
chmod +x gradlew
sh gradlew build