-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathbuild.gradle
113 lines (96 loc) · 2.86 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
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
google()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'org.owasp:dependency-check-gradle:5.3.2'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.25.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
group = project.property('GROUP')
version = project.property('VERSION_NAME')
repositories {
// Insert local test repo here
google()
}
configurePublishing(it)
}
def configurePublishing(Project project) {
project.plugins.withId('com.vanniktech.maven.publish.base') {
project.apply plugin: 'signing'
project.mavenPublishing {
publishToMavenCentral("DEFAULT")
pomFromGradleProperties()
}
if (project.hasProperty('signWithGpgCommand')) {
project.afterEvaluate {
project.signing {
useGpgCmd()
sign project.publishing.publications
}
}
}
if (project.hasProperty('signAllPublications')) {
project.mavenPublishing {
signAllPublications()
}
}
if (project.plugins.hasPlugin('com.android.library')) {
project.mavenPublishing.configure(new AndroidSingleVariantLibrary("release"))
}
}
}
subprojects {
repositories {
mavenCentral()
maven { url "https://maven.google.com" }
flatDir {
dirs 'libs'
}
}
}
ext {
minSdkVersion = 21
compileSdkVersion = 33
browserVersion = '1.5.0'
annotationVersion = '1.3.0'
appcompatVersion = '1.4.2'
androidxCore = '1.9.0'
// SDK dependency versions
gsonVersion = "2.9.1"
// Test dependency versions
junitVersion = '4.13.2'
mockitoVersion = "4.6.1"
robolectricVersion = '4.11'
truthVersion = '1.1.5'
okhttpVersion = '4.11.0'
okioVersion = '3.4.0'
jsonWebTokenVersion = '0.11.2'
assertjCoreVersion = '3.16.1'
androidxLibVersion = '1.5.3'
espressoVersion = "3.5.0"
uiautomatorVersion = "2.2.0"
securityVersion = "1.0.0"
// Gradle plugin version
checkstyleVersion = "10.12.4"
}
tasks.register("showVersion") {
doLast {
logger.lifecycle("Version ID: " + project.versionNum)
logger.lifecycle("Version Name: " + project.versionName)
logger.lifecycle("Version Date: " + project.versionDate)
}
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}