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

Change Gradle dependency scope from compileOnlyApi to api? #28

Closed
sdavids opened this issue Aug 1, 2024 · 1 comment · Fixed by #52
Closed

Change Gradle dependency scope from compileOnlyApi to api? #28

sdavids opened this issue Aug 1, 2024 · 1 comment · Fixed by #52
Assignees

Comments

@sdavids
Copy link

sdavids commented Aug 1, 2024

The jspecify discussion came to the conclusion to use api scope due to RUNTIME retention and tooling issues.

Maybe it is the better choice for apiguardian as well?


dependencies {    
    compileOnlyApi("org.apiguardian:apiguardian-api:1.1.2")
}

dependencies {    
    api("org.apiguardian:apiguardian-api:1.1.2")
}

https://github.com/apiguardian-team/apiguardian?tab=readme-ov-file#gradle

@marcphilipp
Copy link
Member

I think you're referring to jspecify/jspecify#503 (comment), right? In my opinion, since the annotations are not needed at runtime, they should not be declared as api. However, I'd be fine with documenting the two possibilities and letting users decide. WDYT?

marcphilipp added a commit that referenced this issue Oct 16, 2024
@marcphilipp marcphilipp self-assigned this Oct 16, 2024
marcphilipp added a commit that referenced this issue Oct 16, 2024
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.

2 participants