send HEAD to fabric
This commit is contained in:
parent
bb18fad654
commit
980e4998e2
2 changed files with 8 additions and 5 deletions
|
@ -29,9 +29,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
def generateGitBuild = { ->
|
def generateGitBuild = { ->
|
||||||
|
|
||||||
StringBuilder stringBuilder = new StringBuilder();
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
stringBuilder.append('"')
|
|
||||||
try {
|
try {
|
||||||
def stdout = new ByteArrayOutputStream()
|
def stdout = new ByteArrayOutputStream()
|
||||||
exec {
|
exec {
|
||||||
|
@ -43,9 +41,12 @@ def generateGitBuild = { ->
|
||||||
} catch (ignored) {
|
} catch (ignored) {
|
||||||
stringBuilder.append('NoGitSystemAvailable')
|
stringBuilder.append('NoGitSystemAvailable')
|
||||||
}
|
}
|
||||||
stringBuilder.append('-')
|
return stringBuilder.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
def generateDate = { ->
|
||||||
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
stringBuilder.append((new Date()).format('yyyy.MM.dd-HH:mm'))
|
stringBuilder.append((new Date()).format('yyyy.MM.dd-HH:mm'))
|
||||||
stringBuilder.append('"')
|
|
||||||
return stringBuilder.toString()
|
return stringBuilder.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +65,8 @@ android {
|
||||||
versionCode 1500
|
versionCode 1500
|
||||||
version "2.0f-dev"
|
version "2.0f-dev"
|
||||||
buildConfigField "String", "VERSION", '"' + version + '"'
|
buildConfigField "String", "VERSION", '"' + version + '"'
|
||||||
buildConfigField "String", "BUILDVERSION", generateGitBuild()
|
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
|
||||||
|
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
|
|
|
@ -109,6 +109,7 @@ public class FabricPrivacy {
|
||||||
private static void uploadPluginStats() {
|
private static void uploadPluginStats() {
|
||||||
CustomEvent pluginStats = new CustomEvent("PluginStats");
|
CustomEvent pluginStats = new CustomEvent("PluginStats");
|
||||||
pluginStats.putCustomAttribute("version", BuildConfig.VERSION);
|
pluginStats.putCustomAttribute("version", BuildConfig.VERSION);
|
||||||
|
pluginStats.putCustomAttribute("HEAD", BuildConfig.HEAD);
|
||||||
for (PluginBase plugin : MainApp.getPluginsList()) {
|
for (PluginBase plugin : MainApp.getPluginsList()) {
|
||||||
if (!plugin.pluginDescription.alwaysEnabled) {
|
if (!plugin.pluginDescription.alwaysEnabled) {
|
||||||
if (plugin.isEnabled(plugin.getType()))
|
if (plugin.isEnabled(plugin.getType()))
|
||||||
|
|
Loading…
Reference in a new issue