aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-03 02:29:23 -0700
committerAllan Wang <me@allanwang.ca>2017-07-03 02:29:23 -0700
commita87d457e5ad2097ef03bf9763247b3f4cfe37dcb (patch)
tree5d4876e4a6ddb24450d60eac4fa6c526c3117626
parent32d8f6d0d26a13f42a749524a1354cea30ff5092 (diff)
downloadfrost-a87d457e5ad2097ef03bf9763247b3f4cfe37dcb.tar.gz
frost-a87d457e5ad2097ef03bf9763247b3f4cfe37dcb.tar.bz2
frost-a87d457e5ad2097ef03bf9763247b3f4cfe37dcb.zip
Use travis build number as basecode
-rw-r--r--.travis.yml1
-rw-r--r--app/build.gradle8
-rw-r--r--build.gradle22
3 files changed, 5 insertions, 26 deletions
diff --git a/.travis.yml b/.travis.yml
index ea87632b..b053a80b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,7 +18,6 @@ before_install:
- openssl aes-256-cbc -K $encrypted_0f269bed3d88_key -iv $encrypted_0f269bed3d88_iv
-in files/frost.tar.enc -out frost.tar -d
- tar xvf frost.tar
-- printf "Building git tag $(git describe)"
- chmod +x gradlew
after_success:
- chmod +x ./generate-apk-release.sh
diff --git a/app/build.gradle b/app/build.gradle
index 99010de6..10d0239e 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,5 +1,4 @@
plugins {
- id "com.zoltu.git-versioning" version "3.0.3"
id 'com.gladed.androidgitversion' version '0.3.4'
}
@@ -14,14 +13,14 @@ android {
buildToolsVersion project.BUILD_TOOLS
androidGitVersion {
-// baseCode ext.commitCount()
- codeFormat = 'MMNNPPP'
+ baseCode System.getEnv('TRAVIS_BUILD_NUMBER') ?: 0
+ codeFormat = 'MMNNPPXX'
prefix 'v'
}
playAccountConfigs {
defaultAccountConfig {
- jsonFile = file('./files/gplay-keys.json')
+ jsonFile = file('../files/gplay-keys.json')
}
}
@@ -32,6 +31,7 @@ android {
versionCode androidGitVersion.code()
versionName androidGitVersion.name()
multiDexEnabled true
+ playAccountConfig = playAccountConfigs.defaultAccountConfig
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
diff --git a/build.gradle b/build.gradle
index ac155d03..a79419bc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -10,8 +10,6 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${KOTLIN}"
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.github.triplet.gradle:play-publisher:1.2.0'
-//https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit
-// classpath 'org.eclipse.jgit:org.eclipse.jgit:4.8.0.201706111038-r'
}
}
@@ -35,22 +33,4 @@ task generateChangelogMd() {
}
def changelogMd = new File("$project.rootDir/docs/Changelog.md")
changelogMd.write(sw.toString())
-}
-
-//ext.commitCount = { ->
-// def repo
-// def count = 0
-// try {
-// repo = new FileRepositoryBuilder()
-// .readEnvironment()
-// .findGitDir(project.projectDir)
-// .build()
-// } catch (IllegalArgumentException ignore) {
-// // No repo found
-// return count
-// }
-//
-// def git = Git.wrap(repo)
-// def commits = git.log().call()
-// return commits.size()
-//} \ No newline at end of file
+} \ No newline at end of file