mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
Use same versioning system in Android APK.
This commit is contained in:
parent
5c3b37abb9
commit
2b8b6dfad8
2 changed files with 7 additions and 3 deletions
|
@ -277,7 +277,7 @@ public class MainActivity extends AppCompatActivity implements NavigationDrawerF
|
|||
String buildDateString = new SimpleDateFormat("yyyy/MM/dd K:mm a", Locale.getDefault()).format(buildDate);
|
||||
String timestamp = buildDateString.substring(11, buildDateString.length()).startsWith("0:")
|
||||
? buildDateString.replace("0:", "12:") : buildDateString;
|
||||
String aboutMessage = String.format("Build Date: %s", timestamp);
|
||||
String aboutMessage = String.format("Version: %s Date: %s", BuildConfig.VERSION_NAME, timestamp);
|
||||
displaySimpleMessage("About Play!", aboutMessage);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,12 +10,16 @@ buildscript {
|
|||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.0.1'
|
||||
classpath 'org.ajoberstar.grgit:grgit-gradle:4.0.2'
|
||||
}
|
||||
}
|
||||
|
||||
project.ext {
|
||||
keyStorePropFile = rootProject.file('keystore.properties')
|
||||
signingEnabled = keyStorePropFile.exists()
|
||||
git = org.ajoberstar.grgit.Grgit.open()
|
||||
gitVersionCode = git.tag.list().size()
|
||||
gitVersionName = "${git.describe()}"
|
||||
}
|
||||
|
||||
project.afterEvaluate {
|
||||
|
@ -42,8 +46,8 @@ android {
|
|||
compileSdkVersion 'android-28'
|
||||
|
||||
defaultConfig {
|
||||
versionCode 40
|
||||
versionName '0.30'
|
||||
versionCode (100 + gitVersionCode)
|
||||
versionName gitVersionName
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 28
|
||||
externalNativeBuild {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue