Skip to content

Commit 250f963

Browse files
fix(gradle-plugin): replace usages of deprecated methods
Signed-off-by: Sergej Koščejev <[email protected]>
1 parent 305488d commit 250f963

File tree

1 file changed

+3
-3
lines changed
  • plugins/package-managers/gradle/src/main/resources

1 file changed

+3
-3
lines changed

plugins/package-managers/gradle/src/main/resources/init.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class AbstractOrtDependencyTreePlugin<T> implements Plugin<T> {
218218

219219
try {
220220
resolvedArtifacts = configuration.resolvedConfiguration.lenientConfiguration
221-
.getArtifacts(Specs.SATISFIES_ALL)
221+
.getArtifacts()
222222
} catch (ResolveException e) {
223223
project.logger.info("Artifacts for configuration '${configuration.name}' could not be " +
224224
"resolved, therefore no information about artifact classifiers and extensions is " +
@@ -387,7 +387,7 @@ class AbstractOrtDependencyTreePlugin<T> implements Plugin<T> {
387387
return new OrtDependencyImpl(id.group, id.module, id.version, classifier, extension, [] as Set, dependencies,
388388
error, warning, pomFile, null)
389389
} else if (id instanceof ProjectComponentIdentifier) {
390-
if (id.build.isCurrentBuild() || !project.gradle.gradleVersion.isAtLeastVersion(7, 2)) {
390+
if (id.build.buildPath == project.gradle.buildPath || !project.gradle.gradleVersion.isAtLeastVersion(7, 2)) {
391391
def dependencyProject = project.rootProject.findProject(id.projectPath)
392392
return new OrtDependencyImpl(groupId: dependencyProject.group.toString(),
393393
artifactId: dependencyProject.name, version: dependencyProject.version.toString(),
@@ -489,7 +489,7 @@ class AbstractOrtDependencyTreePlugin<T> implements Plugin<T> {
489489
if (id instanceof ModuleComponentIdentifier) {
490490
return toIdentifier(id.group, id.module, id.version)
491491
} else if (id instanceof ProjectComponentIdentifier) {
492-
if (id.build.currentBuild || !project.gradle.gradleVersion.isAtLeastVersion(7, 2)) {
492+
if (id.build.buildPath == project.gradle.buildPath || !project.gradle.gradleVersion.isAtLeastVersion(7, 2)) {
493493
def dependencyProject = project.rootProject.findProject(id.projectPath)
494494
return toIdentifier(dependencyProject.group.toString(), dependencyProject.name,
495495
dependencyProject.version.toString())

0 commit comments

Comments
 (0)