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>
This commit is contained in:
Assam Boudjelthia
2026-04-25 02:02:02 +03:00
parent 35389bc1be
commit 73fa80bab8
14 changed files with 82 additions and 26 deletions

View File

@@ -0,0 +1,17 @@
plugins {
alias(libs.plugins.android.library)
}
android {
namespace = 'org.qtproject.qt.gradlecache.lib'
compileSdk = 36
defaultConfig {
minSdk = 28
}
}
dependencies {
implementation libs.core
testImplementation libs.junit
}

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

View File

@@ -0,0 +1,5 @@
package org.qtproject.qt.gradlecache.lib
object Lib {
fun hello(): String = "hello"
}

View File

@@ -0,0 +1,11 @@
package org.qtproject.qt.gradlecache.lib
import org.junit.Assert.assertEquals
import org.junit.Test
class LibTest {
@Test
fun hello() {
assertEquals("hello", Lib.hello())
}
}