Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archive versions are not inferred from the classpaths #81

Open
guillermocalvo opened this issue Oct 14, 2024 · 0 comments · May be fixed by #80
Open

Archive versions are not inferred from the classpaths #81

guillermocalvo opened this issue Oct 14, 2024 · 0 comments · May be fixed by #80

Comments

@guillermocalvo
Copy link
Contributor

Currently, archive versions are never inferred from the classpaths:

I believe the problem is that JapicmpTask's properties oldClasspath and newClasspath are implicitly initialized as new DefaultConfigurableFileCollection objects.

  @CompileClasspath
  public abstract ConfigurableFileCollection getOldClasspath();

  @CompileClasspath
  public abstract ConfigurableFileCollection getNewClasspath();

Even if source paths are added to the classpaths via from(configuration), these properties never become an instance of Configuration and therefore, they are processed as simple FileCollection objects (ie. no version number is inferred).

configurations {
  baseline
  current
}

dependencies {
  baseline 'org.apache.commons:commons-lang3:3.5'
  current 'org.apache.commons:commons-lang3:3.6'
}

task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask) {
  oldClasspath.from(configurations.baseline)
  newClasspath.from(configurations.current)
  xmlOutputFile = layout.buildDirectory.file('reports/japi.xml').get().asFile
}
@guillermocalvo guillermocalvo linked a pull request Oct 14, 2024 that will close this issue
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 a pull request may close this issue.

1 participant