Skip to content

Commit

Permalink
Bump version to 12.8.79
Browse files Browse the repository at this point in the history
  • Loading branch information
mar-v-in committed Aug 28, 2018
1 parent 7bbdcac commit 4040e3d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ script:
- echo sdk.dir $ANDROID_HOME > local.properties
- export TERM=dumb
- export JAVA_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m"
- ./gradlew assemble
- ./gradlew --stacktrace assemble
android:
components:
- tools
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
}
}
Expand Down
2 changes: 1 addition & 1 deletion extern/GmsApi
2 changes: 1 addition & 1 deletion extern/GmsLib
Submodule GmsLib updated 1 files
+1 −1 extern/GmsApi
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Tue Feb 7 18:49:43 UTC 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip
34 changes: 16 additions & 18 deletions play-services-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,33 @@ dependencies {
implementation project(':vtm-microg-theme')
}

String getMyVersionName() {
def stdout = new ByteArrayOutputStream()
if (rootProject.file("gradlew").exists())
exec {
commandLine 'git', 'describe', '--tags', '--always', '--dirty'; standardOutput = stdout
}
else // automatic build system, don't tag dirty
exec { commandLine 'git', 'describe', '--tags', '--always'; standardOutput = stdout }
return stdout.toString().trim().substring(1)
}

int getMyVersionCode() {
def execResult(...args) {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', '--count', "HEAD"
commandLine args
standardOutput = stdout
}
return Integer.parseInt(stdout.toString().trim())
return stdout.toString().trim()
}

def gmsVersion = "12.8.79"
def gmsVersionCode = Integer.parseInt(gmsVersion.replaceAll('\\.', ''))
def gitVersionBase = execResult('git', 'describe', '--tags', '--abbrev=0').substring(1)
def gitCommitCount = Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD"))
def gitCommitId = execResult('git', 'show-ref', '--abbrev=7', '--head', 'HEAD').split(' ')[0]
def gitDirty = execResult('git', 'status', '--porcelain').size() > 0
def ourVersionBase = gitVersionBase.substring(0, gitVersionBase.lastIndexOf('.'))
def ourVersionCode = gmsVersionCode * 1000 + gitCommitCount + (gitDirty ? 1 : 0)
def ourVersionName = "$ourVersionBase.$gmsVersionCode" + (gitCommitCount > 0 ? "-$gitCommitCount-$gitCommitId" : "") + (gitDirty ? "-dirty" : "")
logger.lifecycle('Starting build for version {} ({})...', ourVersionName, ourVersionCode)

android {
compileSdkVersion androidCompileSdk()
buildToolsVersion "$androidBuildVersionTools"

defaultConfig {
versionName getMyVersionName()
def x = getMyVersionCode() - 367
// We are not allowed to freely choose the hundreds column as it defines the device type
versionCode(12221400 + x % 100 + ((int) (x / 100)) * 1000)
versionName ourVersionName
versionCode ourVersionCode

minSdkVersion androidMinSdk()
targetSdkVersion androidTargetSdk()
Expand Down

0 comments on commit 4040e3d

Please sign in to comment.