builds before platform config
181406
function run(context) {
    const preferences = configPreferences.read(context);
    const platforms = context.opts.cordova.platforms;

    platforms.forEach(platform => {
      if (platform === IOS) {
        iosPlist.addBranchSettings(preferences);
        iosCapabilities.enableAssociatedDomains(preferences);
        iosAssociatedDomains.addAssociatedDomains(preferences);
      }
    });
  }
130049
@Override
    public void configure() throws CoreException {
        if (DEBUG) {
            System.out.println("Adding findbugs to the project build spec.");
        }
        // register FindBugs builder
        addToBuildSpec(FindbugsPlugin.BUILDER_ID);
    }
1317310
function updateXCConfigs(configItems, platformPath){
        xcconfigs.forEach(function(fileName){
            updateXCConfig(platformPath, fileName, configItems);
        });
    }
1310558
def build_config(config_file=get_system_config_directory()):
    
    config = Config(config_file, allow_no_value=True)
    application_versions = find_applications_on_system()

    # Add found versions to config if they don't exist. Versions found
    # in the config file takes precedence over versions found in PATH.
    for item in application_versions.iteritems():
        if not config.has_option(Config.EXECUTABLES, item[0]):
            config.set(Config.EXECUTABLES, item[0], item[1])
    return config
1034271
protected function modifyPreBuild()
    {
        foreach ($this->modifications[ModifiableInterface::PHASE_PRE_BUILD] as $mod) {
            $this->modify($mod, ModifiableInterface::PHASE_PRE_BUILD);
        }
    }
835485
public BasicSebConfiguration addSystemPropertiesBefore(String beforeKey) {
		return (BasicSebConfiguration) addPropertiesBefore(beforeKey, SYSTEM_PROPERTIES_KEY, System.getProperties());
	}
39267
def _prep_bins():
    

    from os import path
    from sys import platform, maxsize
    from shutil import copy
    bit_suffix = "-x86_64" if maxsize > 2**32 else "-x86"
    package_root = path.abspath(path.dirname(__file__))
    prebuilt_path = path.join(package_root, "prebuilt", platform + bit_suffix)
    config = {"MANIFEST_DIR": prebuilt_path}
    try:
        execfile(path.join(prebuilt_path, "manifest.pycfg"), config)
    except IOError:
        return  # there are no prebuilts for this platform - nothing to do
    files = map(lambda x: path.join(prebuilt_path, x), config["FILES"])
    for prebuilt_file in files:
        try:
            copy(path.join(prebuilt_path, prebuilt_file), package_root)
        except IOError:
            pass
98336
public function beforePluginCompile(): void
	{
		// Receive container builder
		$builder = $this->getContainerBuilder();

		// Register services
		$builder->addDefinition($this->extensionPrefix('core.schema.hydrator'))
			->setFactory(ArrayHydrator::class);

		$builder->getDefinition($this->extensionPrefix('core.schema'))
			->setFactory('@' . $this->extensionPrefix('core.schema.hydrator') . '::hydrate', [$this->compileSchema()]);
	}
1178738
public function beforeCompile()
	{
		$builder = $this->getContainerBuilder();

		$this->validateConfig($this->defaults);
		$config = $this->getConfig($this->defaults);

		foreach ($builder->findByType('Nette\Mail\IMailer') as $name => $def) {
			$builder->removeDefinition($name);
		}

		if ($config['debugger'] && interface_exists('Tracy\IBarPanel')) {
			$builder->addDefinition($this->prefix('panel'))
				->setClass('RM\MailPanel')
				->addSetup('$newMessageTime', [$config['newMessageTime']])
				->addSetup('$show', [array_unique($config['show'])])
				->addSetup('$autoremove', [$config['autoremove']])
				->addSetup('$hideEmpty', [$config['hideEmpty']]);
		}

		$builder->addDefinition($this->prefix('mailer'))
			->setClass('RM\FileMailer', [Helpers::expand($config['tempDir'], $builder->parameters)])
			->addSetup('@RM\MailPanel::setFileMailer', ['@self'])
			->addSetup('@Tracy\Bar::addPanel', [$this->prefix('@panel')]);
	}
203159
def setup_platform(hass, config, add_entities, discovery_info=None):
    """"""
    if discovery_info is None:
        return

    switches = []

    manager = hass.data[DOMAIN]['manager']

    if manager.outlets is not None and manager.outlets:
        if len(manager.outlets) == 1:
            count_string = 'switch'
        else:
            count_string = 'switches'

        _LOGGER.info("Discovered %d VeSync %s",
                     len(manager.outlets), count_string)

        if len(manager.outlets) > 1:
            for switch in manager.outlets:
                switch._energy_update_interval = ENERGY_UPDATE_INT
                switches.append(VeSyncSwitchHA(switch))
                _LOGGER.info("Added a VeSync switch named '%s'",
                             switch.device_name)
        else:
            switches.append(VeSyncSwitchHA(manager.outlets))
    else:
        _LOGGER.info("No VeSync switches found")

    add_entities(switches)
1334670
def setup(platform, file_path, threads, parallel)
      spec_path = 'spec/'
      spec_path = file_path.to_s unless file_path.nil?
      puts "SPEC PATH:#{spec_path}"

      unless %w[ios android].include? platform
        puts "Invalid platform #{platform}"
        exit
      end

      execute_specs platform, threads, spec_path, parallel
    end
416022
def build_extensions(self):
        """"""
        global final_supported_archs

        ext_extra_objects = []
        ext_libs = []
        ext_libs_dir = []
        ext_includes = []

        self.platform = CustomBuildExtension.PLATFORMS.get( sys.platform, None )
        if self.platform == None:
            raise Exception("unsupported platform: %s" % sys.platform)

        if self.with_static_binutils: # the user has specified a custom binutils distro.
            print "[+] Using specific binutils static distribution"
            print "[+]   %s" % self.with_static_binutils
            self.platform["libs"] = [os.path.join( self.with_static_binutils, "lib"),]
            self.platform["includes"] = [os.path.join( self.with_static_binutils, "include"),]
            self.platform["possible-lib-ext"] = [".a",] # for all unix platforms.

        # check for known includes
        for inc in self.platform["includes"]:
            if self.check_includes(inc):
                self.includes = inc # found a valid include dir with bintuils
                break
        if self.includes == None:
            raise Exception("unable to determine correct include path for bfd.h / dis-asm.h")

        print "[+] Using binutils headers at:"
        print "[+]   %s" % self.includes

        # we'll use this include path for building.
        ext_includes = [self.includes, ]

        # Try to guess libopcodes / libbfd libs.
        libs_dirs = self.platform["libs"]
        print "[+] Searching binutils libraries..."
        for libdir in libs_dirs:
            for possible_lib_ext in self.platform["possible-lib-ext"]:
                libs = self.find_binutils_libs(libdir, possible_lib_ext)
                if libs:
                    if self.libs:
                        self.libs = self.libs + libs
                    else:
                        self.libs = libs
                    break

        if self.libs == None:
            raise Exception("unable to find binutils libraries.")

        for lib in self.libs:
            print "[+]   %s" % lib
        #
        # check for libopcodes / libbfd
        #
        libnames = [os.path.basename(lib) for lib in self.libs]
        libraries_paths = [os.path.dirname(lib) for lib in self.libs]
        libraries_paths = list(set(libraries_paths))  # removing duplicates
        if not all( [lib.startswith("libopcodes") or lib.startswith("libbfd") for lib in libnames] ):
            raise Exception("missing expected library (libopcodes / libbfd) in %s." % "\n".join(libraries_paths))

        ext_libs_dir += libraries_paths

        if self.with_static_binutils:
            # use libs as extra objects...
            ext_extra_objects.extend( self.libs )
        else:
            ext_libs = [self.prepare_libs_for_cc(os.path.basename(lib)) for lib in self.libs]

        # add dependecy to libiberty
        if self.with_static_binutils or sys.platform == "darwin": # in OSX we always needs a static lib-iverty.

            lib_liberty_partialpath = libraries_paths
            if sys.platform == "darwin": # in osx the lib-iberty is prefixe by "machine" ppc/i386/x86_64
                lib_liberty_partialpath.append( self._darwin_current_arch() )
            lib_liberty_partialpath.append( "libiberty.a" )

            lib_liberty_fullpath = os.path.join(*lib_liberty_partialpath ) # merge the prefix and the path
            if not os.path.isfile(lib_liberty_fullpath):
                raise Exception("missing expected library (libiberty) in %s." % "\n".join(libraries_paths))
            ext_extra_objects.append(lib_liberty_fullpath)

        # generate .py / .h files that depends of libopcodes / libbfd currently selected
        final_supported_archs = self.generate_source_files()

        # final hacks for OSX
        if sys.platform == "darwin":
            # fix arch value.
            os.environ["ARCHFLAGS"] = "-arch %s" % self._darwin_current_arch()
            # In OSX we've to link against libintl.
            ext_libs.append("intl")

            # TODO: we have to improve the detection of gettext/libintl in OSX.. this is a quick fix.
            dirs = [
                "/usr/local/opt/gettext/lib", # homebrew
                "/opt/local/lib" # macports
            ]
            for d in dirs:
                if os.path.exists(d):
                    ext_libs_dir.append(d)

        # fix extensions.
        for extension in self.extensions:
            extension.include_dirs.extend( ext_includes )
            extension.extra_objects.extend( ext_extra_objects )
            extension.libraries.extend( ext_libs )
            extension.library_dirs.extend( ext_libs_dir )

        return build_ext.build_extensions(self)
323217
def build_mxnet(app):
    """"""
    if not os.path.exists(os.path.join(app.builder.srcdir, '..', 'config.mk')):
        _run_cmd("cd %s/.. && cp make/config.mk config.mk && make -j$(nproc) USE_MKLDNN=0 USE_CPP_PACKAGE=1 " %
                app.builder.srcdir)
    else:
        _run_cmd("cd %s/.. && make -j$(nproc) USE_MKLDNN=0 USE_CPP_PACKAGE=1 " %
                app.builder.srcdir)
332324
protected function buildConfiguration()
    {
        $versionAndProjectName = sprintf('%s-%s', str_replace(' ', '_', $this->getOption('projectName')), $this->getOption('version'));
        $this->configuration['versionAndProjectName'] = $versionAndProjectName;

        $this->configuration['zipFile'] = $this->getDeploymentPath() . '/buildArtifacts/' . $versionAndProjectName . '.zip';
        $this->configuration['tarGzFile'] = $this->getDeploymentPath() . '/buildArtifacts/' . $versionAndProjectName . '.tar.gz';
        $this->configuration['tarBz2File'] = $this->getDeploymentPath() . '/buildArtifacts/' . $versionAndProjectName . '.tar.bz2';
    }
692271
function bundlePreprocessor(config) {

    var debug = config.browserify && config.browserify.debug;

    function updateSourceMap(file, content) {
      var map;

      if (debug) {

        map = extractSourceMap(content);

        file.sourceMap = map && map.sourcemap;
      }
    }

    return function(content, file, done) {

      if (b._builtOnce) {
        updateSourceMap(file, content);
        return done(content);
      }

      log.debug('building bundle');

      // wait for the initial bundle to be created
      b.deferredBundle(function(err, content) {

        b._builtOnce = config.autoWatch;

        if (err) {
          return done(BUNDLE_ERROR_TPL);
        }

        content = content.toString('utf-8');
        updateSourceMap(file, content);

        log.info('bundle built');

        done(content);
      });
    };
  }
208373
def _build_save_container(platform, registry, load_cache) -> Optional[str]:
    
    docker_tag = build_util.get_docker_tag(platform=platform, registry=registry)

    # Preload cache
    if load_cache:
        load_docker_cache(registry=registry, docker_tag=docker_tag)

    # Start building
    logging.debug('Building %s as %s', platform, docker_tag)
    try:
        # Increase the number of retries for building the cache.
        image_id = build_util.build_docker(docker_binary='docker', platform=platform, registry=registry, num_retries=10, no_cache=False)
        logging.info('Built %s as %s', docker_tag, image_id)

        # Push cache to registry
        _upload_image(registry=registry, docker_tag=docker_tag, image_id=image_id)
        return None
    except Exception:
        logging.exception('Unexpected exception during build of %s', docker_tag)
        return platform
725426
def builds(self, confs):
        """"""
        self._named_builds = {}
        self._builds = []
        for values in confs:
            if len(values) == 2:
                self._builds.append(BuildConf(values[0], values[1], {}, {}, self.reference))
            elif len(values) == 4:
                self._builds.append(BuildConf(values[0], values[1], values[2], values[3],
                                              self.reference))
            elif len(values) != 5:
                raise Exception("Invalid build configuration, has to be a tuple of "
                                "(settings, options, env_vars, build_requires, reference)")
            else:
                self._builds.append(BuildConf(*values))