This repository was archived by the owner on Dec 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
120 lines (105 loc) · 2 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
buildscript
{
repositories
{
google()
jcenter()
}
dependencies
{
classpath 'com.android.tools.build:gradle:4.1.0'
}
}
allprojects
{
gradle.projectsEvaluated
{
tasks.withType(JavaCompile)
{
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
}
}
repositories
{
google()
jcenter()
maven
{
url "https://maven.google.com"
}
}
}
apply plugin: 'com.android.application'
task versionInfo(type:Exec) \
{
commandLine 'git describe --always'.split()
ext.versionfile = new File('res/raw/version.properties')
standardOutput = new ByteArrayOutputStream()
doLast
{
versionfile.text = 'revision=' + standardOutput.toString()
}
}
android
{
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig
{
minSdkVersion 14
targetSdkVersion 29
versionCode 9
versionName "2.0"
multiDexEnabled true
}
lintOptions
{
checkReleaseBuilds false
abortOnError false
}
signingConfigs
{
release
}
buildTypes
{
release
{
// shrinkResources true
// minifyEnabled true
}
debug
{
debuggable true
}
}
File signFile = rootProject.file('sign.properties')
if (signFile.exists())
{
Properties p = new Properties()
p.load(new FileInputStream(signFile))
android.signingConfigs.release.keyAlias = p.keyAlias
android.signingConfigs.release.storeFile = file(p.keyStore)
android.signingConfigs.release.keyPassword = p.keyPassword
android.signingConfigs.release.storePassword = p.storePassword
buildTypes.release.signingConfig android.signingConfigs.release
}
sourceSets
{
main
{
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
dependencies
{
implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation "androidx.appcompat:appcompat:1.2.0"
implementation "com.google.android.material:material:1.2.1"
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
implementation "androidx.exifinterface:exifinterface:1.3.1"
}
preBuild.dependsOn versionInfo
}