Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbf3b860b8
|
||
|
|
bb1a619b2d
|
||
|
|
3ee56ac6e6
|
||
|
|
a5f8c04cbb
|
||
|
|
1a9c9f41bd
|
||
|
|
bda331df4e
|
||
|
|
8e8b63c534
|
||
|
|
26b84c0539
|
||
|
|
19f422ef63
|
||
|
|
cf250a97cb
|
||
|
|
ee49924cd0
|
+2
-33
@@ -1,4 +1,3 @@
|
|||||||
import java.io.ByteArrayOutputStream
|
|
||||||
import java.util.Properties
|
import java.util.Properties
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@@ -13,36 +12,6 @@ if (hasReleaseKeystore) {
|
|||||||
keystoreProperties.load(keystorePropertiesFile.inputStream())
|
keystoreProperties.load(keystorePropertiesFile.inputStream())
|
||||||
}
|
}
|
||||||
|
|
||||||
// versionName/versionCode come from git, not a hand-maintained literal, so a release tag and
|
|
||||||
// the app's own version can never drift apart. Exactly on a tagged commit this is the tag
|
|
||||||
// itself (e.g. "1.0.0"); otherwise it's "<last-tag>-<commits-since>-g<hash>" (git-describe's
|
|
||||||
// usual dev-build form). No tags yet, or git unavailable: falls back to "0.0.0".
|
|
||||||
fun gitDescribe(): String {
|
|
||||||
return try {
|
|
||||||
val out = ByteArrayOutputStream()
|
|
||||||
exec {
|
|
||||||
commandLine("git", "describe", "--tags", "--always")
|
|
||||||
standardOutput = out
|
|
||||||
}
|
|
||||||
out.toString().trim()
|
|
||||||
} catch (e: Exception) {
|
|
||||||
"0.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun gitCommitCount(): Int {
|
|
||||||
return try {
|
|
||||||
val out = ByteArrayOutputStream()
|
|
||||||
exec {
|
|
||||||
commandLine("git", "rev-list", "--count", "HEAD")
|
|
||||||
standardOutput = out
|
|
||||||
}
|
|
||||||
out.toString().trim().toInt()
|
|
||||||
} catch (e: Exception) {
|
|
||||||
1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "space.bdeshi.veil"
|
namespace = "space.bdeshi.veil"
|
||||||
compileSdk = 35
|
compileSdk = 35
|
||||||
@@ -54,8 +23,8 @@ android {
|
|||||||
// on which OS versions can install and run the app.
|
// on which OS versions can install and run the app.
|
||||||
minSdk = 27
|
minSdk = 27
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = gitCommitCount()
|
versionCode = 1
|
||||||
versionName = gitDescribe()
|
versionName = "1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
android:theme="@style/Theme.Veil">
|
android:theme="@style/Theme.Veil">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.INFO" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class SettingsActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
root.addView(hiddenPackagesChips)
|
root.addView(hiddenPackagesChips)
|
||||||
|
|
||||||
setContentView(ScrollView(this).apply { addView(root); fitsSystemWindows = true })
|
setContentView(ScrollView(this).apply { addView(root) })
|
||||||
refreshAppList()
|
refreshAppList()
|
||||||
refreshHiddenPackages()
|
refreshHiddenPackages()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user