Skip to content

Fix the old version resolved when using Gradle 8.2+ - #4

Merged
ajantha-bhat merged 1 commit into
revapi:mainfrom
jbonofre:FIX_DETECT
Jun 30, 2024
Merged

ajantha-bhat merged 1 commit into
revapi:mainfrom
jbonofre:FIX_DETECT

Conversation

@jbonofre

Copy link
Copy Markdown
Collaborator

Before this PR

With Gradle 8.2+, the plugin doesn't detect any breaking change as it consider the same version for both old/new API.

After this PR

The plugin cleanly detects breaking change with Gradle 8.2+.

Possible downsides?

As it uses externalConfigurations the only downside could be the configuration caching is limited.

@jbonofre

Copy link
Copy Markdown
Collaborator Author

@ajantha-bhat @nastra ^^

import org.gradle.api.artifacts.result.DependencyResult;
import org.gradle.api.artifacts.result.UnresolvedDependencyResult;

import java.io.File;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you run ./gradlew spotlessApply locally? This shouldn't be re-organizing the imports

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I will.

conf.setVisible(false);
});
Configuration oldApiConfiguration = project.getConfigurations().detachedConfiguration();
oldApiConfiguration.getDependencies().add(oldApiDependency);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Maybe good to add a test (as a follow up after the release is also fine)

@ajantha-bhat
ajantha-bhat merged commit 937770f into revapi:main Jun 30, 2024
@ajantha-bhat

Copy link
Copy Markdown
Collaborator

I rebased the PR and fixed formatting before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants