mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
KTIJ-33763 [kotlin] Add possibility to specify productionOnTest flag when adding dependency to Module
GitOrigin-RevId: 0cbd97a98bfbbf8e22b9019e308b30d0f93c415e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a1c5964f24
commit
d05b7efaed
@@ -646,6 +646,7 @@ f:com.intellij.openapi.roots.ModuleRootModificationUtil
|
||||
- s:addContentRoot(com.intellij.openapi.module.Module,java.lang.String):V
|
||||
- s:addDependency(com.intellij.openapi.module.Module,com.intellij.openapi.module.Module):V
|
||||
- s:addDependency(com.intellij.openapi.module.Module,com.intellij.openapi.module.Module,com.intellij.openapi.roots.DependencyScope,Z):V
|
||||
- s:addDependency(com.intellij.openapi.module.Module,com.intellij.openapi.module.Module,com.intellij.openapi.roots.DependencyScope,Z,Z):V
|
||||
- s:addDependency(com.intellij.openapi.module.Module,com.intellij.openapi.roots.libraries.Library):V
|
||||
- s:addDependency(com.intellij.openapi.module.Module,com.intellij.openapi.roots.libraries.Library,com.intellij.openapi.roots.DependencyScope,Z):V
|
||||
- s:addModuleLibrary(com.intellij.openapi.module.Module,java.lang.String):V
|
||||
|
||||
@@ -143,10 +143,15 @@ public final class ModuleRootModificationUtil {
|
||||
}
|
||||
|
||||
public static void addDependency(@NotNull Module from, @NotNull Module to, @NotNull DependencyScope scope, boolean exported) {
|
||||
addDependency(from, to, scope, exported, false);
|
||||
}
|
||||
|
||||
public static void addDependency(@NotNull Module from, @NotNull Module to, @NotNull DependencyScope scope, boolean exported, boolean productionOnTest) {
|
||||
updateModel(from, model -> {
|
||||
ModuleOrderEntry entry = model.addModuleOrderEntry(to);
|
||||
entry.setScope(scope);
|
||||
entry.setExported(exported);
|
||||
entry.setProductionOnTestDependency(productionOnTest);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -169,8 +169,9 @@ abstract class AbstractMultiModuleTest : DaemonAnalyzerTestCase(),
|
||||
fun Module.addDependency(
|
||||
other: Module,
|
||||
dependencyScope: DependencyScope = DependencyScope.COMPILE,
|
||||
exported: Boolean = false
|
||||
): Module = this.apply { ModuleRootModificationUtil.addDependency(this, other, dependencyScope, exported) }
|
||||
exported: Boolean = false,
|
||||
productionOnTest: Boolean = false,
|
||||
): Module = this.apply { ModuleRootModificationUtil.addDependency(this, other, dependencyScope, exported, productionOnTest) }
|
||||
|
||||
fun Module.removeDependency(
|
||||
other: Module,
|
||||
|
||||
Reference in New Issue
Block a user