Comments (4)
The easy work-around is to make it an implementation dependency, instead of a compileOnly. Has implications, and compileOnly would be preferred, but gets you running
from gradle-lint-plugin.
Actually it still identifies it as not used in implementation, as well.
from gradle-lint-plugin.
You might want to just use the gradle-lombok plugin instead and not have to deal dependency scopes for lombok anymore: https://plugins.gradle.org/plugin/io.freefair.lombok
from gradle-lint-plugin.
The Getter
annotation and any other annotation that has a RetentionPolicy @Retention(RetentionPolicy.SOURCE)
will always fail. The Gradle Lint plugin uses ASM to visit compiled class files and review if dependencies declared are in use in said compiled classes. JLS 9.6.4.2 states that the information about this annotation will not be present in the compiled class file:
Annotations may be present only in source code, or they may be present in the binary form of a class or interface. An annotation that is present in the binary form may or may not be available at run time via the reflection libraries of the Java SE Platform. The annotation type java.lang.annotation.Retention is used to choose among these possibilities.
If an annotation a corresponds to a type T, and T has a (meta-)annotation m that corresponds to java.lang.annotation.Retention, then:
...
If m has an element whose value is java.lang.annotation.RetentionPolicy.SOURCE, then a Java compiler must ensure that a is not present in the binary representation of the class or interface in which a appears.
https://docs.oracle.com/javase/specs/jls/se14/html/jls-9.html#jls-9.6.4.2
The only way I can imagine one would be able to determine if these annotations were being used would be to investigate the source file itself.
from gradle-lint-plugin.
Related Issues (20)
- Plugin should not use the deprecated GUtil.loadProperties() function HOT 2
- Error [NullPointerException: Cannot invoke "String.hashCode()" because "version" is null]
- gradleLint.ignore is ignored
- Gradle 8 deprecation warnings
- [18.0.0] `java.lang.ClassNotFoundException: com.netflix.nebula.interop.GradleKt` HOT 5
- Rule `all-dependency` fails when applied on Kotlin module with no `stdlib` usages
- Many false `this dependency is unused and can be removed` HOT 1
- Unable to consume Kotlin MultiPlatform project
- "unused-dependency" rule doesn't work version catalogs HOT 1
- Plugin is incompatible with Gradle 7.6.x and 8.x HOT 1
- kotlin DSL and buildSrc not supported? HOT 1
- Can we create our own Rules?
- Wrong Gradle plugin version in ReadMe
- Add descriptions to the tasks
- Unused-dependecy message working with MapStruct library.
- Cannot add a configuration with name 'test' as a configuration with that name already exists. HOT 1
- Typo 'exection' in link on wiki home
- autoLintAfterFailure = false breaks the build
- No such property: code for class: org.codehaus.groovy.ast.expr.PropertyExpression
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-lint-plugin.