Skip to content

Commit f028a2e

Browse files
authored
Update: Dependencies (#119)
This includes updating the Android Gradle Plugin to 8.11.1 and Gradle to 8.14.3. This also updates the Maven Central publishing configuration.
1 parent b61f4e9 commit f028a2e

File tree

9 files changed

+34
-28
lines changed

9 files changed

+34
-28
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Gradle Plugin Portal](https://img.shields.io/maven-metadata/v/https/plugins.gradle.org/m2/nl.neotech.plugin/android-root-coverage-plugin/maven-metadata.xml.svg?label=Gradle%20Plugin%20Portal)](https://plugins.gradle.org/plugin/nl.neotech.plugin.rootcoverage)
22
[![Maven Central](https://img.shields.io/maven-central/v/nl.neotech.plugin/android-root-coverage-plugin?label=Maven%20Central)](https://search.maven.org/artifact/nl.neotech.plugin/android-root-coverage-plugin)
33
[![Build](https://github.com/NeoTech-Software/Android-Root-Coverage-Plugin/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/NeoTech-Software/Android-Root-Coverage-Plugin/actions/workflows/build.yml)
4-
[![Coverage](https://img.shields.io/codecov/c/gh/NeoTech-Software/Android-Root-Coverage-Plugin/branch/master?token=4I3MXF2WLX)](https://app.codecov.io/gh/NeoTech-Software/Android-Root-Coverage-Plugin/branch/master)
4+
[![Coverage](https://img.shields.io/codecov/c/github/NeoTech-Software/Android-Root-Coverage-Plugin/master)](https://app.codecov.io/gh/NeoTech-Software/Android-Root-Coverage-Plugin/branch/master)
55

66
# Android-Root-Coverage-Plugin
77
**Automatically configures Jacoco code coverage tasks for both combined and per module coverage reports.**

gradle/libs.versions.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
[versions]
22
androidMinSdk = "21"
33
androidTargetSdk = "35"
4-
androidCompileSdk = "35"
5-
kotlin = "2.1.10"
6-
androidGradlePlugin = "8.8.0"
4+
androidCompileSdk = "36"
5+
kotlin = "2.2.0"
6+
androidGradlePlugin = "8.11.1"
77

88
[libraries]
9-
appCompat = { module = "androidx.appcompat:appcompat", version = "1.7.0" }
9+
appCompat = { module = "androidx.appcompat:appcompat", version = "1.7.1" }
1010
androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" }
1111
androidGradlePluginApi = { module = "com.android.tools.build:gradle-api", version.ref = "androidGradlePlugin" }
1212

1313
# Test dependencies
1414
junit = { module = "junit:junit", version = "4.13.2" }
15-
testOrchestrator = { module = "androidx.test:orchestrator", version = "1.4.2" }
15+
testOrchestrator = { module = "androidx.test:orchestrator", version = "1.5.1" }
1616
truth = { module = "com.google.truth:truth", version = "1.4.4" }
1717
supportTestRunner = { module = "androidx.test:runner", version = "1.6.2" }
1818
espressoCore = { module = "androidx.test.espresso:espresso-core", version = "3.6.1" }
1919
androidJUnit = { module = "androidx.test.ext:junit", version = "1.2.1" }
20-
commonsCsv = { module = "org.apache.commons:commons-csv", version = "1.13.0" }
20+
commonsCsv = { module = "org.apache.commons:commons-csv", version = "1.14.0" }
2121
kotlinTest = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
22-
robolectric = { module = "org.robolectric:robolectric", version = "4.14.1" }
23-
mockk = { module = "io.mockk:mockk", version = "1.13.16" }
24-
jacksonYaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version = "2.18.2"}
25-
jacksonKotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version = "2.18.2"}
22+
robolectric = { module = "org.robolectric:robolectric", version = "4.15.1" }
23+
mockk = { module = "io.mockk:mockk", version = "1.14.5" }
24+
jacksonYaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version = "2.19.2"}
25+
jacksonKotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version = "2.19.2"}
2626

2727
[bundles]
28-
androidInstrumentedTest = ["supportTestRunner", "espressoCore", "androidJUnit"]
29-
androidTest = ["androidJUnit", "robolectric"]
30-
jvmTest = ["kotlinTest", "junit", "truth", "commonsCsv"]
28+
androidInstrumentedTest = ["supportTestRunner", "espressoCore", "androidJUnit"]
29+
androidTest = ["androidJUnit", "robolectric"]
30+
jvmTest = ["kotlinTest", "junit", "truth", "commonsCsv"]
3131

3232
[plugins]
3333
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
3434
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
3535
kotlinDokka = { id = "org.jetbrains.dokka", version = "2.0.0" }
3636
pluginPortalPublish = { id = "com.gradle.plugin-publish", version = "1.3.1" }
37-
mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.30.0" }
37+
mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.34.0" }
3838
versionCheck = { id = "com.github.ben-manes.versions", version = "0.52.0" }
3939
androidApp = { id = "com.android.application", version.ref = "androidGradlePlugin"}
4040
androidLibrary = { id = "com.android.library", version.ref = "androidGradlePlugin"}

gradle/wrapper/gradle-wrapper.jar

130 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
8891

8992
# Use the maximum available, or set MAX_FD != -1 to use that value.
9093
MAX_FD=maximum

gradlew.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################

plugin/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import com.vanniktech.maven.publish.SonatypeHost
21
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
32

43
plugins {
@@ -44,7 +43,7 @@ jacocoTestReport {
4443
}
4544

4645
mavenPublishing {
47-
publishToMavenCentral(SonatypeHost.S01)
46+
publishToMavenCentral()
4847
signAllPublications()
4948
}
5049

@@ -105,7 +104,7 @@ pluginManager.withPlugin("jacoco") {
105104
from {
106105
zipTree(project.configurations.getByName(JacocoPlugin.AGENT_CONFIGURATION_NAME).asPath).matching { include 'jacocoagent.jar' }.singleFile
107106
}
108-
into file("${buildDir}/testkit")
107+
into project.layout.buildDirectory.dir("testkit")
109108
}
110109

111110
def javaTestTask = tasks.named(JavaPlugin.TEST_TASK_NAME)

plugin/src/main/kotlin/org/neotech/plugin/rootcoverage/RootCoveragePlugin.kt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@ package org.neotech.plugin.rootcoverage
33
import com.android.build.api.AndroidPluginVersion
44
import com.android.build.api.artifact.ScopedArtifact
55
import com.android.build.api.dsl.BuildType
6-
import com.android.build.api.variant.AndroidComponentsExtension
6+
import com.android.build.api.variant.ApplicationAndroidComponentsExtension
7+
import com.android.build.api.variant.LibraryAndroidComponentsExtension
78
import com.android.build.api.variant.ScopedArtifacts
8-
import com.android.build.api.variant.ScopedArtifactsOperation
99
import com.android.build.api.variant.Variant
1010
import com.android.build.gradle.BaseExtension
1111
import org.gradle.api.GradleException
1212
import org.gradle.api.NamedDomainObjectContainer
1313
import org.gradle.api.Plugin
1414
import org.gradle.api.Project
15-
import org.gradle.api.Task
16-
import org.gradle.api.file.RegularFile
1715
import org.gradle.api.tasks.TaskProvider
1816
import org.gradle.api.tasks.testing.Test
1917
import org.gradle.testing.jacoco.plugins.JacocoPlugin
@@ -54,7 +52,6 @@ class RootCoveragePlugin : Plugin<Project> {
5452
}
5553
}
5654

57-
5855
private fun createSubProjectCoverageTask(subProject: Project) {
5956
val task = subProject.createJacocoReportTask(
6057
taskName = "coverageReport",
@@ -117,7 +114,12 @@ class RootCoveragePlugin : Plugin<Project> {
117114

118115
private fun JacocoReport.addSubProjectInternal(subProject: Project) {
119116
// Only Android modules are supported
120-
val androidComponents = subProject.extensions.getByType(AndroidComponentsExtension::class.java)
117+
val androidComponents = subProject.extensions.findByType(ApplicationAndroidComponentsExtension::class.java) ?: subProject.extensions.findByType(LibraryAndroidComponentsExtension::class.java)
118+
119+
if(androidComponents == null) {
120+
throw GradleException("No application or library extension found on project: ${project.path}!")
121+
}
122+
121123
androidComponents.assertMinimumRequiredAGPVersion(minimumRequiredAgpVersion)
122124

123125
// Get the exact required build variant for the current sub-project.

plugin/src/test/kotlin/org/neotech/plugin/rootcoverage/IntegrationTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class IntegrationTest(
232232

233233
val fixture = File("src/test/test-fixtures/multi-module")
234234

235-
val gradleVersions = arrayOf("8.10.2", "8.11.1", "8.12.1")
235+
val gradleVersions = arrayOf("8.13", "8.14.3")
236236

237237
val configurations = File(fixture, "configurations").listFiles() ?: error("Configurations folder not found in $fixture")
238238
return configurations.flatMap { configuration ->

0 commit comments

Comments
 (0)