https://kotlinlang.org logo
#gradle
Title
# gradle
d

dharmendrajadon

10/04/2023, 10:53 AM
I'm using
build-logic
gradle convention plugin with Kotlin DSL for creating custom
Android
ApplicationConventionPlugin
that declares app module related configs like AGP, kotlin, jacoco & other dependencies. • Using
jUnit5
testing in Android with https://github.com/mannodermaus/android-junit5 & mockK Problem: My unit tests are running successfully when running
.\gradlew test
command, however the dependencies related to test libraries are not being shown as resolved on Android Studio IDE making it difficult to work with auto-completions. Any suggestion on this?
v

Vampire

10/04/2023, 11:00 AM
Try manually refreshing the Gradle build in the IDE. If that does not work, close the project, delete all IDE files and freshly open / import the build.
nono 1
d

dharmendrajadon

10/05/2023, 6:40 AM
Gradle sync works fine when I use
implementation("io.mockk:mockk:xxxxxx")
. However, it doesn't work when using
testImplementation
Copy code
Fails with error: com.intellij.openapi.externalSystem.model.ExternalSystemException: Could not resolve all dependencies for configuration ':app:debugUnitTestCompileClasspath'.

Caused by: java.lang.IllegalStateException: Expected to find a selector with a failure but none was found
v

Vampire

10/05/2023, 9:36 AM
Can you share a build
--scan
?