forked from openid/AppAuth-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
67 lines (56 loc) · 1.54 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import org.ajoberstar.grgit.Grgit
apply from: 'config/keystore.gradle'
buildscript {
repositories {
gradlePluginPortal()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'org.ajoberstar.grgit:grgit-gradle:4.1.1'
classpath 'org.jacoco:org.jacoco.core:0.8.7'
}
}
subprojects {
repositories {
google()
mavenCentral()
}
}
ext.verifyKeystore()
try {
def grgit = Grgit.open(currentDir: project.rootDir)
def lastCommit = grgit.head()
project.ext.versionNum = grgit.log(includes:['HEAD']).size()
project.ext.versionName = grgit.describe()
project.ext.versionDate = lastCommit.getDate()
if (project.ext.versionName == null) {
project.ext.versionName = 'DEV'
}
} catch (Exception ignored) {
project.ext.versionNum = 1
project.ext.versionName = 'DEV'
project.ext.versionDate = new Date()
}
project.ext {
minSdkVersion = 16
compileSdkVersion = 33
googleVersions = [
glide : '4.12.0',
material : '1.3.0',
]
androidXVersions = [
annotation : '1.2.0',
appCompat : '1.3.0',
browser : '1.3.0',
]
okioVersion = '2.10.0'
jodaVersion = '2.10.10'
}
task showVersion {
doLast {
logger.lifecycle("Version ID: " + project.versionNum)
logger.lifecycle("Version Name: " + project.versionName)
logger.lifecycle("Version Date: " + project.versionDate)
}
}