-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
68 lines (49 loc) · 1.79 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
68
// Top-level build file where you can add configuration options common to all sub-projects/modules.
ext {
VARIABLE = 1
play_services_version = '17.0.0'
android_build_sdk_version = 33
android_build_tools_version = '33.0.2'
android_build_target_sdk_version = 33
android_build_min_sdk_version = 24
}
def computeVersionCode(int versionMajor, int versionMinor, int versionPatch, int versionBuild = 0){
return versionMajor * 100000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
}
def generateVersionName(String versionPrefix, int versionMajor, int versionMinor, int versionPatch, String versionSuffix = ""){
def versionName = "${versionPrefix}${versionMajor}.${versionMinor}.${versionPatch}"
if(versionSuffix != null && !versionSuffix.isEmpty() && versionSuffix != "release"){
versionName += "-${versionSuffix}"
}
return versionName
}
def generateVersionNameSuffix(int versionBuild, String releaseType, boolean includeHash = false){
def versionNameSuffix = "${releaseType}.${versionBuild}"
if(includeHash){
versionNameSuffix += " (${getGitShortHash()})"
}
return versionNameSuffix
}
static def releaseTime() {
return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
}
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
// Jai USB serial - start
maven { url 'https://jitpack.io' }
// Jai USB serial - end
}
}