Merge branch 'master' into dev

This commit is contained in:
Milos Kozak 2019-04-29 10:32:51 +02:00
commit 197f3bb691
2 changed files with 10 additions and 2 deletions

View file

@ -79,7 +79,7 @@ def allCommited = { ->
try { try {
def stdout = new ByteArrayOutputStream() def stdout = new ByteArrayOutputStream()
exec { exec {
commandLine 'git', 'status' commandLine 'git', 'status', '-s'
standardOutput = stdout standardOutput = stdout
} }
String commitObject = stdout.toString().trim() String commitObject = stdout.toString().trim()
@ -87,7 +87,8 @@ def allCommited = { ->
} catch (ignored) { } catch (ignored) {
return false; // NoGitSystemAvailable return false; // NoGitSystemAvailable
} }
return stringBuilder.toString().contains("nothing to commit") return stringBuilder.toString().isEmpty()
} }
tasks.matching { it instanceof Test }.all { tasks.matching { it instanceof Test }.all {

View file

@ -32,6 +32,13 @@ object VersionCheckerPlugin : PluginBase(PluginDescription()
private fun checkWarning() { private fun checkWarning() {
val now = System.currentTimeMillis() val now = System.currentTimeMillis()
if (!SP.contains(R.string.key_last_versionchecker_plugin_warning)) {
SP.putLong(R.string.key_last_versionchecker_plugin_warning, now)
return
}
if (isOldVersion(GRACE_PERIOD_WARNING) && shouldWarnAgain(now)) { if (isOldVersion(GRACE_PERIOD_WARNING) && shouldWarnAgain(now)) {
// store last notification time // store last notification time
SP.putLong(R.string.key_last_versionchecker_plugin_warning, now) SP.putLong(R.string.key_last_versionchecker_plugin_warning, now)