Gets the build tool version to be used by zipalign from build.gradle file.

    Returns:
      A string containing the build tool version, default is 23.0.2.
511920
def get_build_tool_version(self):
    
    with open('%s/%s/build.gradle' % (self.path, self.src_folder)) as f:
      for line in f.readlines():
        if 'buildToolsVersion' in line:
          matches = re.findall(r'buildToolsVersion \"(.+?)\"', line)
          if len(matches) == 1:
            return matches[0]
    return config.build_tool_version
1200794
@Exported
    public @CheckForNull String getRequiredCoreVersion() {
        String v = manifest.getMainAttributes().getValue("Jenkins-Version");
        if (v!= null) return v;

        v = manifest.getMainAttributes().getValue("Hudson-Version");
        if (v!= null) return v;
        return null;
    }
377412
def get_version():
    
    VERSION_FILE = os.path.join(module_name, 'version.py')
    txt = open(VERSION_FILE).read()
    mo = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', txt, re.M)
    if mo:
        version = mo.group(1)
        bs_version = os.environ.get('MODULEVER', '0.0')
        assert bs_version == "0.0" or bs_version == version, \
            "Version {} specified by the build system doesn't match {} in " \
            "version.py".format(bs_version, version)
        return version
    else:
        raise RuntimeError('Unable to find version string in {0}.'
                           .format(VERSION_FILE))
992314
def version():
    
    path = join("lib", _CONFIG["name"], "__version__.py")
    with open(path) as stream:
        exec(stream.read())
    return __version__
1371192
def get_version(self):
        
        if ( self.dev == None ): return ''
        buf = [REPORT_ID, ord('v'), 0, 0, 0, 0, 0, 0, 0]
        self.write(buf)
        time.sleep(.05)
        version_raw = self.read()
        version = (version_raw[3] - ord('0')) * 100 + (version_raw[4] - ord('0'))
        return str(version)
841765
def get_version(version):
    ""
    # Now build the two parts of the version number:
    # main = X.Y[.Z]
    # sub = .devN - for pre-alpha releases
    #     | {a|b|c}N - for alpha, beta and rc releases

    main = get_main_version(version)

    sub = ''
    if version[3] != 'final':
        mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
        sub = mapping[version[3]] + str(version[4])

    return main + sub
874072
def get_installed_version_of(name, location=None):
    ''''''
    if location:
        locations = [location]
    else:
        locations = _data_dirs()

    for loc in locations:
        if name not in get_installed_daps(loc):
            continue
        meta = '{d}/meta/{dap}.yaml'.format(d=loc, dap=name)
        data = yaml.load(open(meta), Loader=Loader)
        return str(data['version'])
    return None
884469
def get_current_version(self, increment=None):
		
		ver = (
			self.get_tagged_version()
			or str(self.get_next_version(increment)) + '.dev0'
		)
		return str(ver)
163001
public String getMdwVersion(File projectDir) throws IOException {
        File gradleProps = new File(projectDir + "/gradle.properties");
        if (!gradleProps.exists())
            throw new IOException("Missing: " + gradleProps.getAbsolutePath());
        Properties props = new Properties();
        props.load(new FileInputStream(gradleProps));
        return props.getProperty("mdwVersion");
    }
1071742
def sdk_version(self):
        ''''''
        if self.__sdk == 0:
            try:
                self.__sdk = int(self.adb.cmd("shell", "getprop", "ro.build.version.sdk").communicate()[0].decode("utf-8").strip())
            except:
                pass
        return self.__sdk
54384
def version
      response = get('/getVersion', {}, false)
      ApiVersion.new(response.body['version'], response.body['builddate'])
    end
1140113
def _android_get_installed_platform_tools_version(self):
        

        platform_tools_dir = os.path.join(
            self.android_sdk_dir,
            'platform-tools')

        if not os.path.exists(platform_tools_dir):
            return None

        data_file = os.path.join(platform_tools_dir, 'source.properties')
        if not os.path.exists(data_file):
            return None

        with open(data_file, 'r') as fileh:
            lines = fileh.readlines()

        for line in lines:
            if line.startswith('Pkg.Revision='):
                break
        else:
            self.buildozer.error('Read {} but found no Pkg.Revision'.format(data_file))
            # Don't actually exit, in case the build env is
            # okay. Something else will fault if it's important.
            return None

        revision = line.split('=')[1].strip()

        return revision
98595
def get_version(dev_version=False):
    
    if dev_version:
        version = git_dev_version()
        if not version:
            raise RuntimeError("Could not generate dev version from git.")

        return version

    return "1!%d.%d" % (MAJOR, MINOR)
1173587
public static String getVersion()
    {

        URL versionFile = SnappyLoader.class
                .getResource("/META-INF/maven/org.xerial.snappy/snappy-java/pom.properties");
        if (versionFile == null) {
            versionFile = SnappyLoader.class.getResource("/org/xerial/snappy/VERSION");
        }

        String version = "unknown";
        try {
            if (versionFile != null) {
                Properties versionData = new Properties();
                versionData.load(versionFile.openStream());
                version = versionData.getProperty("version", version);
                if (version.equals("unknown")) {
                    version = versionData.getProperty("SNAPPY_VERSION", version);
                }
                version = version.trim().replaceAll("[^0-9M\\.]", "");
            }
        }
        catch (IOException e) {
            System.err.println(e);
        }
        return version;
    }
889
def get_pretty_version(self, diff_to_increase_ratio):
        
        version = self.get_version(diff_to_increase_ratio)
        build = self.get_last_commit_hash()
        return str(version) + " (" + build + ")"
998921
public org.tensorflow.framework.VersionDef getVersion() {
    return version_ == null ? org.tensorflow.framework.VersionDef.getDefaultInstance() : version_;
  }
1115014
protected String getCurrentReleaseVersion() {
        HttpURLConnection conn = null;
        try {
            final String str = settings.getString(Settings.KEYS.ENGINE_VERSION_CHECK_URL, "http://jeremylong.github.io/DependencyCheck/current.txt");
            final URL url = new URL(str);
            final URLConnectionFactory factory = new URLConnectionFactory(settings);
            conn = factory.createHttpURLConnection(url);
            conn.connect();
            if (conn.getResponseCode() != 200) {
                return null;
            }
            final String releaseVersion = IOUtils.toString(conn.getInputStream(), StandardCharsets.UTF_8);
            if (releaseVersion != null) {
                return releaseVersion.trim();
            }
        } catch (MalformedURLException ex) {
            LOGGER.debug("Unable to retrieve current release version of dependency-check - malformed url?");
        } catch (URLConnectionFailureException ex) {
            LOGGER.debug("Unable to retrieve current release version of dependency-check - connection failed");
        } catch (IOException ex) {
            LOGGER.debug("Unable to retrieve current release version of dependency-check - i/o exception");
        } finally {
            if (conn != null) {
                conn.disconnect();
            }
        }
        return null;
    }