Interface DependencyChecker

  • All Known Implementing Classes:
    DependencyCheckerImpl

    public interface DependencyChecker
    Performs additional checks on dependencies between build types, both snapshot and artifact. Used to prevent configuration and usage of dependencies without following permissions, either via UI or DSL. See also: TW-39192, TW-39209
    Since:
    2024.12
    Author:
    Daniil.Boger
    See Also:
    DependencyCheckerImpl.TC_FEATURE_TOGGLE
    • Method Detail

      • isDependencyAvailable

        boolean isDependencyAvailable​(@Nullable
                                      SBuildType source,
                                      @NotNull
                                      BuildPromotion destination,
                                      @NotNull
                                      DependencyType dependencyType)
        Returns true when the dependency can be resolved, according to project hierarchy and exemptions. The default behavior is following (S - project where source is located, D - project where destination is located):
        • If S is a subproject of D, or D is a subproject of S, returns true
        • If S and D are equal, returns true
        • If there exists an exemption X -> Y, such that X is source or one of its parent projects and Y is destination or one of its parent projects, returns true
        • In other cases, the false is returned
        Parameters:
        source - source buildtype
        destination - destination buildtype
        Returns:
        true if dependency can be resolved, false otherwise