Skip to content

Commit ace14da

Browse files
renovate[bot]sschuberth
authored andcommitted
deps: Update Gradle to version 8.2
See [1] for the release notes. This version deprecates `getRepositoryName()` in favor of `getRepositoryId()`, see [1]. [1]: https://docs.gradle.org/8.2/release-notes.html [2]: gradle/gradle@038d325 Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 1d172c9 commit ace14da

File tree

4 files changed

+32
-19
lines changed

4 files changed

+32
-19
lines changed

gradle/wrapper/gradle-wrapper.jar

1.27 KB
Binary file not shown.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
3+
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
55
networkTimeout=10000
6+
validateDistributionUrl=true
67
zipStoreBase=GRADLE_USER_HOME
78
zipStorePath=wrapper/dists

gradlew

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,13 @@ location of your Java installation."
130130
fi
131131
else
132132
JAVACMD=java
133-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
133+
if ! command -v java >/dev/null 2>&1
134+
then
135+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134136
135137
Please set the JAVA_HOME variable in your environment to match the
136138
location of your Java installation."
139+
fi
137140
fi
138141

139142
# Increase the maximum file descriptors if we can.

plugins/package-managers/gradle-plugin/src/main/kotlin/OrtModelBuilder.kt

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -162,23 +162,32 @@ internal class OrtModelBuilder : ToolingModelBuilder {
162162

163163
when (val id = selectedComponent.id) {
164164
is ModuleComponentIdentifier -> {
165-
val repositoryName = (selectedComponent as? ResolvedComponentResultInternal)?.repositoryName
166-
val pomFile = repositories[repositoryName]?.let { repositoryUrl ->
167-
// Note: Only Maven-style layout is supported for now.
168-
buildString {
169-
append(repositoryUrl.removeSuffix("/"))
170-
append('/')
171-
append(id.group.replace('.', '/'))
172-
append('/')
173-
append(id.module)
174-
append('/')
175-
append(id.version)
176-
append('/')
177-
append(id.module)
178-
append('-')
179-
append(id.version)
180-
append(".pom")
165+
val pomFile = if (selectedComponent is ResolvedComponentResultInternal) {
166+
val repositoryId = runCatching { selectedComponent.repositoryId }
167+
.recoverCatching {
168+
@Suppress("DEPRECATION")
169+
selectedComponent.repositoryName
170+
}.getOrNull()
171+
172+
repositories[repositoryId]?.let { repositoryUrl ->
173+
// Note: Only Maven-style layout is supported for now.
174+
buildString {
175+
append(repositoryUrl.removeSuffix("/"))
176+
append('/')
177+
append(id.group.replace('.', '/'))
178+
append('/')
179+
append(id.module)
180+
append('/')
181+
append(id.version)
182+
append('/')
183+
append(id.module)
184+
append('-')
185+
append(id.version)
186+
append(".pom")
187+
}
181188
}
189+
} else {
190+
null
182191
}
183192

184193
val modelBuildingResult = poms.getValue(id.toString())

0 commit comments

Comments
 (0)