From 1d21b1f97dd3100fc16ddd3fbef60aa93129d17f Mon Sep 17 00:00:00 2001 From: Leandro Colmenarez Diaz Date: Sun, 15 Feb 2026 10:44:16 -0300 Subject: [PATCH 1/3] Chore: Update CI trigger branch to `develop` only Modifies the `android-ci.yml` workflow to trigger only on pushes to the `develop` branch, removing `master`. --- Library/build.gradle.kts | 96 +++++++----------------- app/build.gradle.kts | 16 ++-- build.gradle.kts | 2 - gradle/libs.versions.toml | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 5 files changed, 40 insertions(+), 78 deletions(-) diff --git a/Library/build.gradle.kts b/Library/build.gradle.kts index 808ae3b..819952a 100644 --- a/Library/build.gradle.kts +++ b/Library/build.gradle.kts @@ -1,14 +1,11 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent import org.jetbrains.kotlin.gradle.dsl.JvmTarget -import org.gradle.testing.jacoco.tasks.JacocoReport plugins { alias(libs.plugins.android.library) - alias(libs.plugins.kotlin.android) - alias(libs.plugins.android.coveralls) alias(libs.plugins.android.junit5) - id("jacoco") + `maven-publish` } android { @@ -18,7 +15,7 @@ android { defaultConfig { minSdk = 21 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArguments.put("useTestStorageService", "true") + testInstrumentationRunnerArguments["useTestStorageService"] = "true" consumerProguardFiles("consumer-rules.pro") } @@ -56,11 +53,6 @@ android { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } - kotlin { - compilerOptions { - jvmTarget = JvmTarget.JVM_17 - } - } testOptions { unitTests { @@ -69,9 +61,33 @@ android { } } } +kotlin { + compilerOptions { + jvmTarget = JvmTarget.JVM_17 + } +} +publishing { + publications { + create("release") { + groupId = "com.github.LeandroLCD" + artifactId = "query" + version = project.version.toString() + } + } +} -jacoco { - toolVersion = "0.8.10" +afterEvaluate { + val releaseComponent = components.findByName("release") + if (releaseComponent != null) { + publishing { + publications { + val pub = getByName("release") as MavenPublication + pub.from(releaseComponent) + } + } + } else { + logger.warn("Android 'release' component not found; maven publication won't include component artifacts.") + } } tasks.withType { useJUnitPlatform() @@ -93,60 +109,4 @@ dependencies { testImplementation(kotlin("test")) } -/** - * Genera reporte JaCoCo a partir de las pruebas instrumentadas (androidTest) - */ - -tasks.register("jacocoAndroidTestReport") { - dependsOn("connectedDebugAndroidTest") - - group = "Reporting" - description = "Generates JaCoCo coverage report for Android Instrumented Tests." - - val buildDir = layout.buildDirectory - - reports { - xml.required.set(true) - html.required.set(true) - html.outputLocation.set(file("$buildDir/reports/jacoco/html")) - xml.outputLocation.set(file("$buildDir/reports/jacoco/jacocoAndroidTestReport.xml")) - } - - // Directorios de código fuente - sourceDirectories.setFrom( - files( - "src/main/java", - "src/main/kotlin" - ) - ) - - // Clases compiladas del build de debug - classDirectories.setFrom( - files( - fileTree("${buildDir.get()}/intermediates/javac/debug") { - exclude("**/R.class", "**/R\$*.class", "**/BuildConfig.*", "**/Manifest*.*") - }, - fileTree("${buildDir.get()}/tmp/kotlin-classes/debug") { - exclude("**/R.class", "**/R\$*.class", "**/BuildConfig.*", "**/Manifest*.*") - } - ) - ) - - // Archivo de ejecución JaCoCo generado por las pruebas instrumentadas - executionData.setFrom( - fileTree(buildDir) { - include("**/outputs/code_coverage/*AndroidTest/connected_coverage*.ec*") - } - ) - - doFirst { - executionData.setFrom(files(executionData.filter { it.exists() })) - } -} -/** - * Enlaza el reporte JaCoCo con Coveralls - */ -tasks.named("coverallsJacoco") { - dependsOn("jacocoAndroidTestReport") -} diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9b8f627..da81a15 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,6 +1,7 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { alias(libs.plugins.android.application) - alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.compose) } @@ -29,16 +30,19 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = "11" + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } + buildFeatures { compose = true } } +kotlin { + compilerOptions { + jvmTarget = JvmTarget.JVM_17 + } +} dependencies { diff --git a/build.gradle.kts b/build.gradle.kts index b92bb8e..e9caa79 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,6 @@ plugins { alias(libs.plugins.android.application) apply false - alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.compose) apply false alias(libs.plugins.android.library) apply false - alias(libs.plugins.android.coveralls) apply false alias(libs.plugins.android.junit5) apply false } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7f3048c..5d30eb6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -agp = "8.13.2" +agp = "9.0.1" junitJupiterApi = "6.0.1" junitJupiterEngine = "6.0.1" junitJupiterParams = "6.0.1" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f5bcbc7..39a6076 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sat Oct 04 15:26:03 CLST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 24e14f46ce935b354bf2fd42362e1e16f9094053 Mon Sep 17 00:00:00 2001 From: Leandro Colmenarez Diaz Date: Sun, 15 Feb 2026 10:47:23 -0300 Subject: [PATCH 2/3] Chore: Update Gradle and dependencies Updates various dependencies to their newer versions: * Gradle Wrapper from 9.2.1 to 9.3.1 * Kotlin from 2.2.21 to 2.3.10 * JUnit Jupiter from 6.0.1 to 6.0.2 * Compose BOM from 2025.12.00 to 2026.02.00 * `activity-compose` from 1.12.1 to 1.12.4 * `mannodermaus` (android-junit5) plugin from 1.14.0.0 to 2.0.1 Additionally, removes unused `kotlin-android` and `android-coveralls` plugin definitions. --- gradle/libs.versions.toml | 16 +++++++--------- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5d30eb6..6c4aff1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,17 +1,17 @@ [versions] agp = "9.0.1" -junitJupiterApi = "6.0.1" -junitJupiterEngine = "6.0.1" -junitJupiterParams = "6.0.1" -kotlin = "2.2.21" +junitJupiterApi = "6.0.2" +junitJupiterEngine = "6.0.2" +junitJupiterParams = "6.0.2" +kotlin = "2.3.10" coreKtx = "1.17.0" junit = "4.13.2" junitVersion = "1.3.0" -mannodermaus = "1.14.0.0" +mannodermaus = "2.0.1" espressoCore = "3.7.0" lifecycleRuntimeKtx = "2.10.0" -activityCompose = "1.12.1" -composeBom = "2025.12.00" +activityCompose = "1.12.4" +composeBom = "2026.02.00" appcompat = "1.7.1" dateTime = "1.3.0" coveralls = "1.2.20" @@ -40,10 +40,8 @@ dateTime = { module = "com.github.LeandroLCD:DateTime", version.ref = "dateTime" [plugins] android-application = { id = "com.android.application", version.ref = "agp" } -kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } android-library = { id = "com.android.library", version.ref = "agp" } -android-coveralls = { id = "com.github.nbaztec.coveralls-jacoco", version.ref = "coveralls" } android-junit5 = { id = "de.mannodermaus.android-junit5", version.ref = "mannodermaus" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 39a6076..82f3a2a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sat Oct 04 15:26:03 CLST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From e309c5479819e236c416dbf3769df047a5e949ab Mon Sep 17 00:00:00 2001 From: Leandro Colmenarez Diaz Date: Sun, 15 Feb 2026 10:47:39 -0300 Subject: [PATCH 3/3] Chore: Update Gradle and dependencies Updates various dependencies to their newer versions: * Gradle Wrapper from 9.2.1 to 9.3.1 * Kotlin from 2.2.21 to 2.3.10 * JUnit Jupiter from 6.0.1 to 6.0.2 * Compose BOM from 2025.12.00 to 2026.02.00 * `activity-compose` from 1.12.1 to 1.12.4 * `mannodermaus` (android-junit5) plugin from 1.14.0.0 to 2.0.1 Additionally, removes unused `kotlin-android` and `android-coveralls` plugin definitions. --- gradle/libs.versions.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6c4aff1..14b38bb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,7 +14,6 @@ activityCompose = "1.12.4" composeBom = "2026.02.00" appcompat = "1.7.1" dateTime = "1.3.0" -coveralls = "1.2.20" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }