Gradle plugin for JVM projects written in Java, Kotlin, Groovy, or Scala; and Android projects written in Java or Kotlin. Provides advice for managing dependencies and other applied plugins
Apache License 2.0
1.82k
stars
121
forks
source link
Incorrect advice for testFixtures configuration in android project #1323
(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version
1.9.24
(Optional) Android Gradle Plugin (AGP) version
8.5.2
(Optional) reason output for bugs relating to incorrect advice
------------------------------------------------------------
You asked about the dependency ':kt-lib'.
You have been advised to remove this dependency from 'testFixturesImplementation'.
------------------------------------------------------------
Shortest path from :lib to :kt-lib for debugCompileClasspath:
:lib
\--- :kt-lib
Shortest path from :lib to :kt-lib for debugRuntimeClasspath:
:lib
\--- :kt-lib
Shortest path from :lib to :kt-lib for debugUnitTestCompileClasspath:
:lib
\--- :kt-lib
Shortest path from :lib to :kt-lib for debugUnitTestRuntimeClasspath:
:lib
\--- :kt-lib
Shortest path from :lib to :kt-lib for debugAndroidTestCompileClasspath:
:lib
\--- :kt-lib
Shortest path from :lib to :kt-lib for debugAndroidTestRuntimeClasspath:
:lib
\--- :kt-lib
Shortest path from :lib to :kt-lib for releaseCompileClasspath:
:lib
\--- :kt-lib
Shortest path from :lib to :kt-lib for releaseRuntimeClasspath:
:lib
\--- :kt-lib
Shortest path from :lib to :kt-lib for releaseUnitTestCompileClasspath:
:lib
\--- :kt-lib
Shortest path from :lib to :kt-lib for releaseUnitTestRuntimeClasspath:
:lib
\--- :kt-lib
Source: debug, main
-------------------
* Uses 1 class: com.example.utils.SomeUtils (implies implementation).
Source: release, main
---------------------
* Uses 1 class: com.example.utils.SomeUtils (implies implementation).
Source: debug, test
-------------------
(no usages)
Source: release, test
---------------------
(no usages)
Source: debug, android_test
---------------------------
(no usages)
Describe the bug
So i have two modules, the first one is just pure kotlin with one util class
object SomeUtils {
fun blabla() = println("Hey")
}
the second is android module with enabled testFixtures option and android.experimental.enableTestFixturesKotlinSupport=true
Plugin version 2.5.0
Gradle version 8.11
JDK version 17
(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version 1.9.24
(Optional) Android Gradle Plugin (AGP) version 8.5.2
(Optional)
reason
output for bugs relating to incorrect adviceDescribe the bug So i have two modules, the first one is just pure kotlin with one util class
the second is android module with enabled testFixtures option and
android.experimental.enableTestFixturesKotlinSupport=true
build.gradle
one class in src/main
and stub implementation in src/testFixtures
When I run projectHealth task I get the following message
If you follow the advice and remove the dependency, code in src/testFixtures won't compile