mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
KTIJ-33763 [kotlin] Collect test dependencies for production modules in case productionOnTest flag is enabled
We assume that `productionOnTest` flag is only relevant for dependencies with `COMPILE` or `PROVIDED` scope. For `TEST` scope, setting this flag should not be possible and should not change anything. ^KTIJ-33763 Fixed GitOrigin-RevId: 176b29e80f07ac9c4e861a988758ba0bf81b1427
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7d24dca19c
commit
c8462e7bdf
@@ -179,7 +179,13 @@ internal class KaSourceModuleDependenciesProvider(private val project: Project)
|
||||
when (scope) {
|
||||
DependencyScope.COMPILE, DependencyScope.PROVIDED -> {
|
||||
to.addIfNotNull(module.toKaSourceModule(project, KaSourceModuleKind.PRODUCTION))
|
||||
if (kind == KaSourceModuleKind.TEST) {
|
||||
|
||||
val dependsOnTest = when (kind) {
|
||||
KaSourceModuleKind.PRODUCTION -> productionOnTest
|
||||
KaSourceModuleKind.TEST -> true
|
||||
}
|
||||
|
||||
if (dependsOnTest) {
|
||||
to.addIfNotNull(module.toKaSourceModule(project, KaSourceModuleKind.TEST))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ graph TD
|
||||
style KaSourceModule_5 fill:#608BC1
|
||||
style KaSourceModule_6 fill:#31511E
|
||||
KaSourceModule_1 --> KaSourceModule_3
|
||||
KaSourceModule_1 --> KaSourceModule_4
|
||||
KaSourceModule_2 --> KaSourceModule_1
|
||||
KaSourceModule_2 --> KaSourceModule_3
|
||||
KaSourceModule_2 --> KaSourceModule_4
|
||||
@@ -32,6 +33,7 @@ graph TD
|
||||
linkStyle 5 stroke:black
|
||||
linkStyle 6 stroke:black
|
||||
linkStyle 7 stroke:black
|
||||
linkStyle 8 stroke:#E6C767
|
||||
linkStyle 8 stroke:black
|
||||
linkStyle 9 stroke:#E6C767
|
||||
linkStyle 10 stroke:#E6C767
|
||||
linkStyle 11 stroke:#E6C767
|
||||
|
||||
@@ -18,6 +18,7 @@ KaSourceModule:
|
||||
stableModuleName: <A>
|
||||
regularDependencies:
|
||||
KaSourceModule(B, production)
|
||||
KaSourceModule(B, test)
|
||||
friendDependencies:
|
||||
<empty>
|
||||
dependsOnDependencies:
|
||||
|
||||
Reference in New Issue
Block a user