dependency-analysis-gradle-plugin icon indicating copy to clipboard operation
dependency-analysis-gradle-plugin copied to clipboard

Advised to change KGP-added `testSuiteNameApi` dependency on kotlin-stdlib to `testSuiteNameImplementation` with JVM Test Suite Plugin

Open ianbrandt opened this issue 2 years ago • 0 comments

Build scan link https://scans.gradle.com/s/dbkbjeg4dv4og/

Plugin version 1.27.0

Gradle version 8.5

JDK version 17.0.8.1

(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version 1.9.21

(Optional) Android Gradle Plugin (AGP) version N/A

(Optional) reason output for bugs relating to incorrect advice

PS C:\Dev\Repos\SDKotlin\sd-kotlin-talks> .\gradlew :di-with-koin:reason --id org.jetbrains.kotlin:kotlin-stdlib
Configuration on demand is an incubating feature.
Calculating task graph as no cached configuration is available for tasks: :di-with-koin:reason --id org.jetbrains.kotlin:kotlin-stdlib
Type-safe project accessors is an incubating feature.

> Configure project :di-with-koin
w: ATTENTION: 'kotlin.experimental.tryK2' is an experimental option enabled in the project for trying out the new Kotlin K2 compiler only.
Please refrain from using it in production code and provide feedback to the Kotlin team for any issues encountered via https://kotl.in/issue

> Task :di-with-koin:compileIntegrationTestKotlin
w: Language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features

> Task :di-with-koin:compileTestKotlin
w: Language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features

> Task :di-with-koin:reason

----------------------------------------
You asked about the dependency 'org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21'.
There is no advice regarding this dependency.
----------------------------------------

Shortest path from :di-with-koin to org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21 for integrationTestCompileClasspath:
:di-with-koin
\--- io.insert-koin:koin-core-jvm:3.5.0
      \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21

Shortest path from :di-with-koin to org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21 for integrationTestRuntimeClasspath:
:di-with-koin
\--- io.insert-koin:koin-core-jvm:3.5.0
      \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21

Shortest path from :di-with-koin to org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21 for compileClasspath:
:di-with-koin
\--- io.insert-koin:koin-core-jvm:3.5.0
      \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21

Shortest path from :di-with-koin to org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21 for runtimeClasspath:
:di-with-koin
\--- io.insert-koin:koin-core-jvm:3.5.0
      \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21

Shortest path from :di-with-koin to org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21 for testCompileClasspath:
:di-with-koin
\--- io.insert-koin:koin-core-jvm:3.5.0
      \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21

Shortest path from :di-with-koin to org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21 for testRuntimeClasspath:
:di-with-koin
\--- io.insert-koin:koin-core-jvm:3.5.0
      \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21

Source: main
------------
(no usages)

Source: test
------------
(no usages)

Source: integrationTest
-----------------------
(no usages)

##### 'kotlin.experimental.tryK2' results #####
:di-with-koin:compileIntegrationTestKotlin: 2.0 language version
:di-with-koin:compileTestKotlin: 2.0 language version
##### 100% (2/2) tasks have been compiled with Kotlin 2.0 #####

BUILD SUCCESSFUL

Describe the bug

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildHealth'.
> Advice for :di-with-koin
  Existing dependencies which should be modified to be as indicated:
    integrationTestImplementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.21") (was integrationTestApi)

To Reproduce Steps to reproduce the behavior:

  1. gradlew buildHealth on https://github.com/sdkotlin/sd-kotlin-talks/tree/a7571fc464831fc23124e52cd8ce0fc445339326.

Expected behavior No advice for org.jetbrains.kotlin:kotlin-stdlib

Additional context

  • #1026
  • https://youtrack.jetbrains.com/issue/KT-63285/KGP-Deprecate-and-remove-testApi-configuration
  • https://docs.gradle.org/current/userguide/jvm_test_suite_plugin.html

ianbrandt avatar Dec 05 '23 22:12 ianbrandt