-
-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Labels
Milestone
Description
Plugin version
3.4.1
Gradle version
8.13.0
JDK version
17
(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version
2.1.21
(Optional) reason output for bugs relating to incorrect advice
You asked about the dependency ':lib3'.
You have been advised to change this dependency to 'implementation' from 'api'.
------------------------------------------------------------
Shortest path from :lib2 to :lib3 for compileClasspath:
:lib2
\--- :lib3
Shortest path from :lib2 to :lib3 for runtimeClasspath:
:lib2
\--- :lib3
Shortest path from :lib2 to :lib3 for testCompileClasspath:
:lib2
\--- :lib3
Shortest path from :lib2 to :lib3 for testRuntimeClasspath:
:lib2
\--- :lib3
Source: main
------------
* Imports 1 class: com.example.lib3.MyOptIn (implies implementation).
Source: test
------------
(no usages)
Describe the bug
Existing dependencies which should be modified to be as indicated:
implementation(project(":lib3")) (was api)
The plugin suggests changing configuration from api to implementation for the module containing OptIn annotation. As a result, the compiler fails to recognize invocations of methods annotated with OptIn.
To Reproduce
Execute
./gradlew :lib2:projectHealth
Expected behavior
Declare dependency with OptIn annotations as api or compileApi?

