Commit 2efcda68 authored by Daniel Sonck's avatar Daniel Sonck
Browse files

Merge pull request #35 in THFM/fm.touhou.touhoufm from development to alpha

* commit '289112b9':
  [THFMA-19] Use git directly for versions
parents e4362312 289112b9
import org.ajoberstar.grgit.Grgit
buildscript {
repositories {
jcenter()
......@@ -19,16 +17,13 @@ plugins {
id 'com.github.triplet.play' version '2.1.0'
}
apply from: 'version.gradle'
if(project.hasProperty("TouHouFM.signing")
&& new File(project.property("TouHouFM.signing") + ".gradle").exists()) {
apply from: project.property("TouHouFM.signing") + ".gradle"
}
ext {
git = Grgit.open()
gitVersionCode = git.tag.list().size()+11 // Add the base that is still on google
gitVersionName = git.describe({tags= true})
}
repositories {
jcenter()
......
......@@ -7,7 +7,6 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'org.ajoberstar.grgit:grgit-gradle:3.0.0'
}
}
......
#!/bin/bash
VERSION_NAME=$(git describe --tags)
VERSION_CODE=$(( $(git tag --list | wc -l) + 11))
cat > app/version.gradle <<VERSION_EOF
ext {
gitVersionCode = ${VERSION_CODE}
gitVersionName = "${VERSION_NAME}"
}
VERSION_EOF
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment