Interface BuildContext

  • All Known Subinterfaces:
    BuildContextEx
    All Known Implementing Classes:
    BuildStateExImpl

    public interface BuildContext
    This interface represents build-wide parameters of a build. Those parameters are used as base parameters when build runner parameters from BuildRunnerContext are created. In most cases runner parameters BuildRunnerContext should be used instead.

    Changes to those parameters will be visible for all build runner contexts.

    Since:
    6.0
    • Method Detail

      • addSystemProperty

        void addSystemProperty​(@NotNull
                               String key,
                               @NotNull
                               String value)
        Adds build wide system property. Creates build parameters with Constants.SYSTEM_PREFIX prefix

        Modifications will be available in all build runner states.

        Parameters:
        key -
        value -
        Since:
        6.0
      • addEnvironmentVariable

        void addEnvironmentVariable​(@NotNull
                                    String key,
                                    @NotNull
                                    String value)
        Adds build wide environment variable. Creates build parameters with Constants.ENV_PREFIX prefix

        Note, on Windows machines environment size can be limited.

        Modifications will be available in all build runner states.

        Parameters:
        key - name, may be case sensitive or not depending on OS
        value - value
        Since:
        6.0
      • addConfigurationParameter

        void addConfigurationParameter​(@NotNull
                                       String key,
                                       @NotNull
                                       String value)
        Adds build wide configuration parameter. Modifications will be available in all build runner states.
        Parameters:
        key - name
        value - value
        Since:
        6.0
      • getBuildParameters

        @NotNull
        BuildParametersMap getBuildParameters()
        Returns build parameters. Some of values may not be fully resolved.
        Returns:
        build-wide build parameters
        Since:
        6.0
      • getConfigurationParameters

        @NotNull
        Map<String,​String> getConfigurationParameters()
        Returns configuration parameters of this build
        Returns:
        unmodifiable configuration parameters map
        Since:
        6.0
      • getParametersResolver

        @NotNull
        ValueResolver getParametersResolver()
        Creates value resolver for parameters resolution in strings. The resolution rules are the same as for build parameters
        Returns:
        value resolver to perform resolution of all parameters references within string
        Since:
        6.0