Skip to content

Commit c1a3d9e

Browse files
committed
Add git hash in android version
1 parent 28ecb5a commit c1a3d9e

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

android/app/build.gradle

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,26 @@ plugins {
55
id "io.sentry.android.gradle" version "3.1.2"
66
}
77

8+
def getGitHash = { ->
9+
def stdout = new ByteArrayOutputStream()
10+
exec {
11+
commandLine 'git', 'rev-parse', '--short', 'HEAD'
12+
standardOutput = stdout
13+
}
14+
return stdout.toString().trim()
15+
}
16+
817
android {
9-
compileSdk 31
18+
compileSdk 33
1019

1120
buildToolsVersion "32.0.0"
1221

1322
defaultConfig {
1423
applicationId "com.httpsms"
1524
minSdk 30
16-
targetSdk 30
25+
targetSdk 33
1726
versionCode 1
18-
versionName "1.0"
27+
versionName "${getGitHash()}"
1928

2029
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2130
}
@@ -48,11 +57,11 @@ dependencies {
4857
implementation 'com.jakewharton.timber:timber:5.0.1'
4958
implementation 'androidx.preference:preference:1.2.0'
5059
implementation 'androidx.work:work-runtime-ktx:2.7.1'
51-
implementation 'androidx.core:core-ktx:1.8.0'
60+
implementation 'androidx.core:core-ktx:1.9.0'
5261
implementation "androidx.cardview:cardview:1.0.0"
5362
implementation 'com.beust:klaxon:5.5'
5463
implementation 'androidx.work:work-runtime-ktx:2.7.1'
55-
implementation 'androidx.appcompat:appcompat:1.4.2'
64+
implementation 'androidx.appcompat:appcompat:1.5.1'
5665
implementation 'org.apache.commons:commons-text:1.9'
5766
implementation 'com.google.android.material:material:1.6.1'
5867
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ buildscript {
77
}
88
dependencies {
99
// Add this line
10-
classpath 'com.google.gms:google-services:4.3.13'
10+
classpath 'com.google.gms:google-services:4.3.14'
1111
}
1212
}
1313

1414
plugins {
15-
id 'com.android.application' version '7.3.0' apply false
16-
id 'com.android.library' version '7.3.0' apply false
15+
id 'com.android.application' version '7.3.1' apply false
16+
id 'com.android.library' version '7.3.1' apply false
1717
id 'org.jetbrains.kotlin.android' version '1.6.21' apply false
1818
}
1919

0 commit comments

Comments
 (0)