-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathvariables.gradle
209 lines (148 loc) · 7.76 KB
/
variables.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/**************************************************************************************************
GRADLE VARIABLES
*************************************************************************************************/
/*
* @author: [email protected]
*
* This Gradle script contains common build logic in the form of variables (this includes, but is
* not limited to version codes and the like). These variables are dispatched to the relevant
* project files via either local or remote.gradle.
*
* @TODO: Use objects, convert to custom Gradle plugin
*/
/**************************************************************************************************
VERSION CODES
*************************************************************************************************/
ext.p1 = 'ghp'
logger.warn('gradle-config/variables.gradle -- gradle.ext.workspacePath: ' + gradle.ext.workspacePath)
// ODK-X Application versions
ext.odkxGroupId = 'org.opendatakit' // ApplicationID is groupId + appName
ext.primaryVersionCode = 246
ext.snapshotVersionCode = 248
ext.primaryVersion = '2.2.0'
ext.snapshotVersion = '2.2.0-SNAPSHOT'
// SDK versions
ext.compileVersion = 32
ext.minVersion = 21
ext.targetVersion = 29
// Java version
ext.javaVersion = JavaVersion.VERSION_11
ext.p2 = 'rTo7othM4U9vYcGZaN'
/**************************************************************************************************
GLOBAL VARIABLES
*************************************************************************************************/
ext.p3 = 'zMUk4GgompI80GVEAG'
ext.testCoverage = true // Toggles AndroidTest JaCoCo reports
ext.minify = false // Toggles minify for the release build
// List of files to apply "PickFirst" to in Gradle dependencies closure
ext.packageList = ['META-INF/DEPENDENCIES',
'META-INF/LICENSE',
'META-INF/LICENSE.txt',
'META-INF/NOTICE',
'META-INF/NOTICE.txt',
'META-INF/services/com.fasterxml.jackson.core.JsonFactory',
'META-INF/services/com.fasterxml.jackson.core.ObjectCodec',
'META-INF/services/javax.ws.rs.ext.MessageBodyReader',
'META-INF/services/javax.ws.rs.ext.MessageBodyWriter']
ext.signStoreFilePath = System.getenv("KEYSTORE")
ext.signStorePass = System.getenv("KEYSTORE_PASSWORD")
ext.signKeyAlias = System.getenv("KEY_ALIAS")
ext.signKeyPass = System.getenv("KEY_PASSWORD")
ext.shouldSign = System.getenv("KEYSTORE") != null
ext.githubMvnUser = "odxreadonlybot"
ext.githubMvnPass = ext.p1 + '_' + ext.p2 + ext.p3
/******************************************** Variants *******************************************/
// Primary flavor corresponds to the git main branch
gradle.ext.flavorPrimaryPrefix = 'primary'
gradle.ext.flavorPrimarySuffix = 'Primary'
// Snapshot flavor corresponds to the development branch
gradle.ext.flavorSnapshotPrefix = 'snapshot'
gradle.ext.flavorSnapshotSuffix = 'Snapshot'
// Release type corresponds to the release build type, which is publicly distributed
gradle.ext.typeReleasePrefix = 'release'
gradle.ext.typeReleaseSuffix = 'Release'
// Debug type corresponds to the debug build type, which includes debug symbols
gradle.ext.typeDebugPrefix = 'debug'
gradle.ext.typeDebugSuffix = 'Debug'
/**************************************************************************************************
VARIANT CLASSIFIERS
*************************************************************************************************/
ext.primaryRelease = gradle.ext.flavorPrimaryPrefix + gradle.ext.typeReleaseSuffix
ext.primaryDebug = gradle.ext.flavorPrimaryPrefix + gradle.ext.typeDebugSuffix
ext.snapshotRelease = gradle.ext.flavorSnapshotPrefix + gradle.ext.typeReleaseSuffix
ext.snapshotDebug = gradle.ext.flavorSnapshotPrefix + gradle.ext.typeDebugSuffix
/**************************************************************************************************
TEST
*************************************************************************************************/
// Test app naming scheme
ext.testNameSuffix = ".test"
// Instrumentation runner to register
ext.instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
/**************************************************************************************************
NAMES (libs)
*************************************************************************************************/
/* -- LIBRARY -- */
ext.libraryPackageName = 'androidlibrary'
ext.libraryNamespace = ext.odkxGroupId + "." + ext.libraryPackageName
// Path from top-level Gradle script to local version of AndroidLibrary
ext.libraryProjectPath = new File(gradle.ext.workspacePath + "/androidlibrary/androidlibrary_lib")
// Path for subproject directory
ext.librarySubProjectDictory = new File('androidlibrary')
// Root project name
ext.libraryProjectRoot = ':androidlibrary'
// Child project name
ext.libraryProjectChild = ':androidlibrary_lib'
// External child project name
ext.libraryProjectName = ext.libraryProjectRoot + ext.libraryProjectChild
/* -- COMMON -- */
ext.commonPackageName = 'androidcommon'
ext.commonNamespace = ext.odkxGroupId + "." + ext.commonPackageName
// Path from top-level Gradle script to local version of AndroidCommon
ext.commonProjectPath = new File(gradle.ext.workspacePath + "/androidcommon/androidcommon_lib")
// Path for subproject directory
ext.commonSubProjectDictory = new File('androidcommon')
// Root project name
ext.commonProjectRoot = ':androidcommon'
// Child project name
ext.commonProjectChild = ':androidcommon_lib'
// External child project name
ext.commonProjectName = ext.commonProjectRoot + ext.commonProjectChild
/* -- SENSORS (lib) (SENSORSINTERFACE) -- */
ext.sensorsInterfacePackageName = '.sensorsinterface'
// Path from top-level Gradle script to local version of SensorsInterface
ext.sensorsInterfaceProjectPath = new File(gradle.ext.workspacePath + "/sensorsinterface/sensorsinterface_lib")
// Path for subproject directory
ext.sensorsInterfaceSubProjectDictory = new File('sensorsinterface')
// Root project name
ext.sensorsInterfaceProjectRoot = ':sensorsinterface'
// Child project name
ext.sensorsInterfaceProjectChild = ':sensorsinterface_lib'
// External child project name
ext.sensorsInterfaceProjectName = ext.sensorsInterfaceProjectRoot + ext.sensorsInterfaceProjectChild
/**************************************************************************************************
NAMES (apps)
*************************************************************************************************/
/* -- SERVICES -- */
ext.servicesProjectChild = ':services_app'
ext.servicesPackageName = 'services'
ext.sevicesNamespace = ext.odkxGroupId + "." + ext.servicesPackageName
/* -- SCAN -- */
ext.scanProjectChild = ':scan_app'
ext.scanPackageName = 'scan'
ext.scanNamespace = ext.odkxGroupId + "." + ext.scanPackageName
/* -- SURVEY -- */
ext.surveyProjectChild = ':survey_app'
ext.surveyPackageName = 'survey'
ext.surveyNamespace = ext.odkxGroupId + "." + ext.surveyPackageName
/* -- TABLES -- */
ext.tablesProjectChild = ':tables_app'
ext.tablesPackageName = 'tables'
ext.tablesNamespace = ext.odkxGroupId + "." + ext.tablesPackageName
/* -- SENSORS FRAMEWORK -- */
ext.sensorsFrameworkProjectChild = ':sensorsframework_app'
ext.sensorsFrameworkPackageName = 'sensors'
ext.sensorsFrameworkNamespace = ext.odkxGroupId + "." + ext.sensorsFrameworkPackageName
/* -- SUBMIT -- */
ext.submitProjectChild = ':submit_app'
ext.submitPackageName = 'tables'
ext.submitNamespace = ext.odkxGroupId + "." + ext.submitPackageName