build-info
build-info copied to clipboard
Compile error implementing org.jfrog.build.api.util.Log - Cannot access org.jfrog.filespecs.utils.Log
Describe the bug
It's currently not possible to implement the public interface org.jfrog.build.api.util.Log. This is because the Log interface leaks an implementation class org.jfrog.filespecs.utils.Log. In Gradle all classes and interfaces that come from a library used in a class or method signature should be declared as an api dependency.
Fix:
The build-info-api should explicitly declare org.jfrog.filespecs:file-specs-java as an api dependency here or else here
To Reproduce With a new Gradle project create and compile the following class:
public class LogAdapter implements org.jfrog.build.api.util.Log {
// override methods
}
Compiler error:
error: cannot access org.jfrog.filespecs.utils.Log
public class LogAdapter implements org.jfrog.build.api.util.Log {
^
class file for org.jfrog.filespecs.utils.Log not found
Expected behavior
The org.jfrog.build.api.util.Log interface can be implemented since it is in a public API
Versions
- org.jfrog.filespecs:file-specs-java:1.1.2
- org.jfrog.buildinfo:build-info-api:2.41.24
Additional context The project must be using the Gradle module system (instead of maven pom files). This will happen automatically with newer versions of Gradle.
The workaround is to manually declare the library in the consuming project:
implementation 'org.jfrog.filespecs:file-specs-java:1.1.2'
This issue has been marked as stale due to 6 months of inactivity. As part of our effort to address every issue properly, please feel free to remove the stale label or keep this issue active by leaving a comment. Otherwise, it will be closed in 7 days
.