-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsettings.gradle
More file actions
191 lines (134 loc) · 8.47 KB
/
Copy pathsettings.gradle
File metadata and controls
191 lines (134 loc) · 8.47 KB
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
rootProject.name = 'jmix-docs'
/**
* Returns the branch to check out in an external sample repository, or null to use
* the default branch of that repository. Resolution order:
* 1. -PsamplesBranch.<repo-name>=<branch> - override for a single repository
* 2. the branch passed to cloneOrPull() - branch pinned for a repository
* 3. -PsamplesBranch=<branch> or samplesBranch in gradle.properties
*/
String resolveSamplesBranch(String repoName, String pinnedBranch) {
def perRepoBranch = settings.providers.gradleProperty("samplesBranch.${repoName}").getOrNull()
return perRepoBranch ?: pinnedBranch ?: settings.providers.gradleProperty('samplesBranch').getOrNull()
}
void cloneOrPull(String repoUrl, String targetDir, String pinnedBranch = null) {
File dir = file(targetDir)
def branch = resolveSamplesBranch(dir.name, pinnedBranch)
if (!dir.exists()) {
println "Cloning ${repoUrl} into ${dir.absolutePath}" + (branch ? " and switching to ${branch}" : "")
exec {
commandLine 'git', 'clone', repoUrl, dir.absolutePath
}
if (branch) {
exec {
workingDir dir.absolutePath
commandLine 'git', 'checkout', branch
}
}
} else {
if (branch) {
def currentBranch = ['git', '-C', dir.absolutePath, 'rev-parse', '--abbrev-ref', 'HEAD'].execute().text.trim()
if (currentBranch == 'HEAD') {
println "WARNING: ${targetDir} is not on a branch, expected '${branch}'"
} else if (currentBranch && currentBranch != branch) {
println "WARNING: ${targetDir} is on branch '${currentBranch}', expected '${branch}' (see samplesBranch in gradle.properties)"
}
}
if (settings.ext.find('pullExamples')) {
println "Pulling the latest changes in ${dir.absolutePath}"
exec {
workingDir dir.absolutePath
commandLine 'git', 'pull'
}
}
}
}
cloneOrPull('https://github.com/jmix-framework/jmix-business-logic-sample', 'external/jmix-business-logic-sample')
includeBuild 'external/jmix-business-logic-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-application-events-sample', 'external/jmix-application-events-sample')
includeBuild 'external/jmix-application-events-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-application-logging-sample', 'external/jmix-application-logging-sample')
includeBuild 'external/jmix-application-logging-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-mongodb-integration-sample', 'external/jmix-mongodb-integration-sample')
includeBuild 'external/jmix-mongodb-integration-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-integrated-apps-sample', 'external/jmix-integrated-apps-sample')
includeBuild 'external/jmix-integrated-apps-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-separate-tiers-sample', 'external/jmix-separate-tiers-sample')
includeBuild 'external/jmix-separate-tiers-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-openapi-integration-sample', 'external/jmix-openapi-integration-sample')
includeBuild 'external/jmix-openapi-integration-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-data-modeling-many-to-many-sample', 'external/jmix-data-modeling-many-to-many-sample')
includeBuild 'external/jmix-data-modeling-many-to-many-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-data-modeling-entity-inheritance-sample', 'external/jmix-data-modeling-entity-inheritance-sample')
includeBuild 'external/jmix-data-modeling-entity-inheritance-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-data-modeling-composition-sample', 'external/jmix-data-modeling-composition-sample')
includeBuild 'external/jmix-data-modeling-composition-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-initial-entity-values-sample', 'external/jmix-initial-entity-values-sample')
includeBuild 'external/jmix-initial-entity-values-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-social-login-sample', 'external/jmix-social-login-sample')
includeBuild 'external/jmix-social-login-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-restds-oidc-sample', 'external/jmix-restds-oidc-sample')
includeBuild 'external/jmix-restds-oidc-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-observability-logging-sample', 'external/jmix-observability-logging-sample')
includeBuild 'external/jmix-observability-logging-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-observability-tracing-sample', 'external/jmix-observability-tracing-sample')
includeBuild 'external/jmix-observability-tracing-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-reports-sample', 'external/jmix-reports-sample')
includeBuild 'external/jmix-reports-sample'
cloneOrPull('https://github.com/jmix-framework/jmix-ui-samples', 'external/jmix-ui-samples', 'main')
includeBuild 'external/jmix-ui-samples'
includeBuild 'content/modules/audit/examples/audit-ex1'
includeBuild 'content/modules/authorization-server/examples/authserver-ex1'
includeBuild 'content/modules/bpm/examples/bpm-ex1'
includeBuild 'content/modules/business-calendar/examples/calendars-ex1'
includeBuild 'content/modules/charts/examples/charts-ex1'
includeBuild 'content/modules/charts/examples/charts-ex2'
includeBuild 'content/modules/data-access/examples/data-access-ex1'
includeBuild 'content/modules/data-model/examples/data-model-ex1'
includeBuild 'content/modules/dyn-attr/examples/dyn-attr-ex1'
includeBuild 'content/modules/features/examples/features-ex1'
includeBuild 'content/modules/files/examples/files-ex1'
includeBuild 'content/modules/flow-ui/examples/onboarding'
includeBuild 'content/modules/calendar/examples/fullcalendar-ex1'
includeBuild 'content/modules/calendar/examples/fullcalendar-ex2'
includeBuild 'content/modules/grid-export/examples/gridexport-ex1'
includeBuild 'content/modules/kanban/examples/kanban-ex1'
includeBuild 'content/modules/kanban/examples/kanban-ex2'
includeBuild 'content/modules/localization/examples/localization_ex1'
includeBuild 'content/modules/maps/examples/maps-ex1'
includeBuild 'content/modules/maps/examples/maps-ex2'
includeBuild 'content/modules/modularity/examples/base'
includeBuild 'content/modules/modularity/examples/ext'
includeBuild 'content/modules/multitenancy/examples/multitenancy-ex1'
includeBuild 'content/modules/notifications/examples/notifications-ex1'
includeBuild 'content/modules/oidc/examples/oidc-ex1'
includeBuild 'content/modules/pessimistic-lock/examples/pslock-ex1'
includeBuild 'content/modules/reports/examples/library'
includeBuild 'content/modules/reports/examples/reports-onboarding'
includeBuild 'content/modules/rest/examples/rest-ex1'
includeBuild 'content/modules/rest-ds/examples/rest-ds-client'
includeBuild 'content/modules/rest-ds/examples/rest-ds-service'
includeBuild 'content/modules/rest-ds/examples/rest-ds-shared/shared-addon'
includeBuild 'content/modules/rest-ds/examples/rest-ds-shared/products'
includeBuild 'content/modules/rest-ds/examples/rest-ds-shared/orders'
includeBuild 'content/modules/search/examples/search-ex1'
includeBuild 'content/modules/security/examples/security-ex1'
includeBuild 'content/modules/superset/examples/superset-ex1'
includeBuild 'content/modules/superset/examples/superset-ex2'
includeBuild 'content/modules/testing/examples/testing-ex1'
includeBuild 'content/modules/uiconstraints/examples/uiconstraints-ex1'
includeBuild 'content/modules/webdav/examples/webdav-ex1'
includeBuild 'content/modules/pivot-table/examples/pivottable-onboarding'
includeBuild 'content/modules/pivot-table/examples/pivottable-ex1'
includeBuild 'content/modules/message-templates/examples/messagetemplates-ex1'
includeBuild 'content/modules/tabbed-mode/examples/tabbedmode-ex1'
includeBuild 'content/modules/testing/examples/masquerade-ex1'
includeBuild 'content/modules/groupdatagrid/examples/groupdatagrid-ex1'
includeBuild 'content/modules/email/examples/email-ex1'
includeBuild 'content/modules/quartz/examples/quartz-ex1'
includeBuild 'content/modules/appsettings/examples/appsettings-ex1'
includeBuild 'content/modules/saml/examples/saml-ex1'
includeBuild 'content/modules/dyn-model/examples/dyn-model-ex1'
includeBuild 'content/modules/ai-tools/examples/ai-tools-ex1'
includeBuild 'content/modules/vaadin-dashboard/examples/vaadin-dashboard-ex1'
includeBuild 'content/modules/vaadin-spreadsheet/examples/vaadin-spreadsheet-ex1'
includeBuild 'content/modules/deployment/examples/depl-ex1'