Skip to content

Commit e0d73dd

Browse files
committed
update: add section to whatsnew2020.md
1 parent f617736 commit e0d73dd

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/topics/whatsnew2020.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,27 @@ By default, this property is set to `false` and the `apiElements` variant in Gra
584584
We would appreciate your feedback on this new approach. Have you noticed any performance improvements while using it?
585585
Let us know by adding a comment in [YouTrack](https://youtrack.jetbrains.com/issue/KT-61861/Gradle-Kotlin-compilations-depend-on-packed-artifacts).
586586
587+
### Aligned dependency behavior of Kotlin Gradle plugin with java-test-fixtures plugin
588+
589+
Prior to Kotlin 2.0.20, if you used the [`java-test-fixtures` plugin](https://docs.gradle.org/current/userguide/java_testing.html#sec:java_test_fixtures)
590+
in your project, there was a difference between Gradle and the Kotlin Gradle plugin in how dependencies were propagated.
591+
592+
The Kotlin Gradle plugin propagated dependencies:
593+
594+
* From the `java-test-fixtures` plugin's `implementation` and `api` dependency types to the `test` source set compilation classpath.
595+
* From the main source set's `implementation` and `api` dependency types to the `java-test-fixtures` plugin's source set compilation classpath.
596+
597+
However, Gradle only propagated dependencies in the `api` dependency types.
598+
599+
This difference in behavior led to some projects finding resource files multiple times in the classpath.
600+
601+
As of Kotlin 2.0.20, the Kotlin Gradle plugin's behavior is aligned with Gradle's `java-test-fixtures` plugin so this
602+
problem no longer occurs for this or other Gradle plugins.
603+
604+
As a result of this change, some dependencies in the `test` and `testFixtures` source sets may no longer be accessible.
605+
If this happens, either change the dependency declaration type from `implementation` to `api` or add a new dependency
606+
declaration on the affected source set.
607+
587608
### Added task dependency for rare cases when the compile task lacks one on an artifact
588609
589610
Prior to 2.0.20, we found that there were scenarios where a compile task was missing a task dependency for one

0 commit comments

Comments
 (0)