For more info on build API go <a href="https://wiki.guildwars2.com/wiki/API:2/build">here</a><br/>
get current game bild

@return current game build
@throws GuildWars2Exception see {@link ErrorCode} for detail
@see GameBuild game build info
501624
public GameBuild getCurrentGameBuild() throws GuildWars2Exception {
		try {
			Response<GameBuild> response = gw2API.getCurrentGameBuild().execute();
			if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
			return response.body();
		} catch (IOException e) {
			throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
		}
	}
195027
public TwoStepsGOV3Function<T> build() throws IOException {
			if (built) throw new IllegalStateException("This builder has been already used");
			built = true;
			if (transform == null) {
				if (chunkedHashStore != null) transform = chunkedHashStore.transform();
				else throw new IllegalArgumentException("You must specify a TransformationStrategy, either explicitly or via a given ChunkedHashStore");
			}
			return new TwoStepsGOV3Function<>(keys, transform, values, tempDir, chunkedHashStore);
		}
167883
@Override
    public T build() {
        return build(new ProxyCreatedCallback<T>() {

            @Override
            public void onProxyCreationFinished(T result) {
                logger.trace("proxy created: interface: {} domains: {}", interfaceName, domains);
            }

            @Override
            public void onProxyCreationError(JoynrRuntimeException error) {
                logger.error("error creating proxy: interface: {} domains: {}, error: {}",
                             interfaceName,
                             domains,
                             error.getMessage());
            }
        });
    }
420662
public FoxHttpRequest build() throws MalformedURLException, FoxHttpRequestException {
        if (this.url != null) {
            foxHttpRequest.setUrl(this.url);
        }
        return foxHttpRequest;
    }
1179915
public OperationDescription buildDescription() {
        if (this.isDone()) {
            return null;
        }

        return new OperationDescription(
                this.pollStrategy.methodParser().fullyQualifiedMethodName(),
                this.pollStrategy.strategyData(),
                this.originalHttpRequest);
    }
1161394
public function main()
    {
        if (!$this->havePatchFile) {
            throw new BuildException('patchfile argument is required', $this->getLocation());
        }

        $toExecute = $this->cmd;
        $toExecute->setExecutable(self::$PATCH);

        if ($this->originalFile !== null) {
            $toExecute->createArgument()->setFile($this->originalFile);
        }

        $exe = new ExecTask();
        $exe->setCommand(implode(' ', $toExecute->getCommandline()));
        $exe->setLevel('info');
        $exe->setExecutable($toExecute->getExecutable());

        try {
            if ($this->directory === null) {
                $exe->setDir($this->getProject()->getBasedir());
            } else {
                if (!$this->directory->isDirectory()) {
                    throw new BuildException($this->directory . ' is not a directory.', $this->getLocation());
                }
                $exe->setDir($this->directory);
            }

            $this->log($toExecute->describeCommand(), Project::MSG_VERBOSE);

            $returnCode = $exe->main();
            if ($exe->isFailure($returnCode)) {
                $msg = "'" . self::$PATCH . "' failed with exit code " . $returnCode;
                if ($this->failOnError) {
                    throw new BuildException($msg);
                }
                $this->log($msg, Project::MSG_ERR);
            }
        } catch (IOException $e) {
            if ($this->failOnError) {
                throw new BuildException($e, $this->getLocation());
            }
            $this->log($e->getMessage(), Project::MSG_ERR);
        }
    }
507596
public static int getBuildVersion() {
		try {
			Properties props = new Properties();
			props.load(ResourceLoader.getResourceAsStream("version"));
			
			int build = Integer.parseInt(props.getProperty("build"));
			Log.info("Slick Build #"+build);
			
			return build;
		} catch (Exception e) {
			Log.error("Unable to determine Slick build number");
			return -1;
		}
	}
47986
public function getBuild()
    {
        $key = $this->getBuildId();

        if (empty($key)) {
            return null;
        }

        $cacheKey   = 'Cache.Build.' . $key;
        $rtn        = $this->cache->get($cacheKey, null);

        if (empty($rtn)) {
            $rtn    = Factory::getStore('Build', 'PHPCI')->getById($key);
            $this->cache->set($cacheKey, $rtn);
        }

        return $rtn;
    }
96608
@Override
    public CauseOfBlockage getCauseOfBlockage() {
        // Block builds until they are done with post-production
        if (!isConcurrentBuild() && isLogUpdated()) {
            final R lastBuild = getLastBuild();
            if (lastBuild != null) {
                return new BlockedBecauseOfBuildInProgress(lastBuild);
            } else {
                // The build has been likely deleted after the isLogUpdated() call.
                // Another cause may be an API implementation glitсh in the implementation for AbstractProject. 
                // Anyway, we should let the code go then.
                LOGGER.log(Level.FINE, "The last build has been deleted during the non-concurrent cause creation. The build is not blocked anymore");
            }
        }
        if (blockBuildWhenDownstreamBuilding()) {
            AbstractProject<?,?> bup = getBuildingDownstream();
            if (bup!=null)
                return new BecauseOfDownstreamBuildInProgress(bup);
        }
        if (blockBuildWhenUpstreamBuilding()) {
            AbstractProject<?,?> bup = getBuildingUpstream();
            if (bup!=null)
                return new BecauseOfUpstreamBuildInProgress(bup);
        }
        return null;
    }
811956
@Exported
    @QuickSilver
    public RunT getLastBuild() {
        SortedMap<Integer, ? extends RunT> runs = _getRuns();

        if (runs.isEmpty())
            return null;
        return runs.get(runs.firstKey());
    }
514335
public function getErrorsForBuild($buildId, $since = null)
    {
        $query = 'SELECT * FROM build_error
                    WHERE build_id = :build';

        if (!is_null($since)) {
            $query .= ' AND created_date > :since';
        }

        $query .= ' LIMIT 15000';

        $stmt = Database::getConnection('read')->prepare($query);

        $stmt->bindValue(':build', $buildId, \PDO::PARAM_INT);

        if (!is_null($since)) {
            $stmt->bindValue(':since', $since);
        }

        if ($stmt->execute()) {
            $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);

            $map = function ($item) {
                return new BuildError($item);
            };
            $rtn = array_map($map, $res);

            return $rtn;
        } else {
            return array();
        }
    }
918237
protected T build() {
        final T instance;
        try {
            instance = build(connection(), maxContentLength(),
                                     isValidateHttpHeaders(), isPropagateSettings());
        } catch (Throwable t) {
            throw new IllegalStateException("failed to create a new InboundHttp2ToHttpAdapter", t);
        }
        connection.addListener(instance);
        return instance;
    }
648058
public @CheckForNull Queue.Executable getCurrentExecutable() {
        lock.readLock().lock();
        try {
            return executable;
        } finally {
            lock.readLock().unlock();
        }
    }
1079240
@Nonnull
    public static ObjectId getCommitSHA1(@Nonnull Run<?, ?> build) throws IOException {
        List<BuildData> buildDataList = build.getActions(BuildData.class);

        Job<?, ?> parent = build.getParent();

        BuildData buildData = calculateBuildData(
            parent.getName(), parent.getFullName(), buildDataList
        );

        if (buildData == null) {
            throw new IOException(Messages.BuildDataHelper_NoBuildDataError());
        }

        // buildData?.lastBuild?.marked and fall back to .revision with null check everywhere to be defensive
        Build b = buildData.lastBuild;
        if (b != null) {
            Revision r = b.marked;
            if (r == null) {
                r = b.revision;
            }
            if (r != null) {
                return r.getSha1();
            }
        }

        // Nowhere to report => fail the build
        throw new IOException(Messages.BuildDataHelper_NoLastRevisionError());
    }
653017
public function main(){
        
        if(is_null($this->getDomain())){
            throw new \BuildException('the domain property is required');
        }

        if(is_null($this->getName())){
            throw new \BuildException('the name property is required');
        }

        if(is_null($this->getVersion())){
            throw new \BuildException('the version property is required');
        }

        if(is_null($this->getTasklist())){
            throw new \BuildException('the tasklist property is required');
        }

        try {
            $activity = $this->getService()->describeActivityType([
                'domain' => $this->getDomain(),
                'activityType' => [
                    'name' => $this->getName(),
                    'version' => $this->getVersion()
                ]
            ]);

            if ($activity->get('typeInfo')['status'] != 'REGISTERED') {
                throw new \BuildException('the activity "' . $this->getName() . '" is no more available');
            }

            $this->log('The activity "' . $this->getName() . '" already exists');
        } catch (SwfException $e) {
            $this->log('Creating "' . $this->getName() . '" v.' . $this->getVersion() . ' activity');

            $params = [
                'domain' => $this->getDomain(),
                'name' => $this->getName(),
                'version' => $this->getVersion(),
                'description' => $this->getDescription(),
                'defaultTaskStartToCloseTimeout' => $this->getStartToCloseTimeout() ?: 'NONE',
                'defaultTaskHeartbeatTimeout' => $this->getHeartbeatTimeout() ?: 'NONE',
                'defaultTaskScheduleToStartTimeout' => $this->getScheduleToStartTimeout() ?: 'NONE',
                'defaultTaskScheduleToCloseTimeout' => $this->getScheduleToCloseTimeout() ?: 'NONE',
                'defaultTaskList' => [
                    'name' => $this->getTasklist()
                ]
            ];

            $this->getService()->registerActivityType($params);

            $this->log('"' . $this->getName() . '" v.' . $this->getVersion() . ' activity successfully created');
        }
    }
761080
@Nullable
  private static String getBuildDate() {
    try {
      URL res = JLanguageTool.class.getResource(JLanguageTool.class.getSimpleName() + ".class");
      if (res == null) {
        // this will happen on Android, see http://stackoverflow.com/questions/15371274/
        return null;
      }
      Object connObj = res.openConnection();
      if (connObj instanceof JarURLConnection) {
        JarURLConnection conn = (JarURLConnection) connObj;
        Manifest manifest = conn.getManifest();
        return manifest.getMainAttributes().getValue("Implementation-Date");
      } else {
        return null;
      }
    } catch (IOException e) {
      throw new RuntimeException("Could not get build date from JAR", e);
    }
  }
777550
public function getBuild()
    {
        if (
            $this->git->isVersionComingFromGit() &&
            ($value = $this->git->version('build'))
        ) {
            return $value;
        }

        if ($this->config->get('build.mode') === Constants::BUILD_MODE_NUMBER) {
            return $this->config->get('build.number');
        }

        return $this->git->getCommit();
    }