Skip to content

Commit 77b69fc

Browse files
committed
Remove support for offline mode
1 parent 031b900 commit 77b69fc

12 files changed

+50
-370
lines changed

Diff for: build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ group = "com.gradle"
1515
repositories {
1616
maven {
1717
name = "Solutions"
18-
url = uri("https://repo.gradle.org/artifactory/solutions")
18+
url = uri("https://repo.grdev.net/artifactory/solutions")
1919
credentials {
2020
username = providers
2121
.environmentVariable("GRADLE_SOLUTIONS_REPOSITORY_USERNAME")

Diff for: components/scripts/gradle/01-validate-incremental-building.sh

+7-55
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,11 @@ execute() {
7171
wizard_execute() {
7272
print_introduction
7373

74-
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
75-
print_bl
76-
explain_prerequisites_ccud_gradle_plugin "I."
74+
print_bl
75+
explain_prerequisites_ccud_gradle_plugin "I."
7776

78-
print_bl
79-
explain_prerequisites_api_access "II."
80-
else
81-
print_bl
82-
explain_prerequisites_ccud_gradle_plugin
83-
fi
77+
print_bl
78+
explain_prerequisites_api_access "II."
8479

8580
print_bl
8681
explain_collect_git_details
@@ -141,19 +136,11 @@ execute_build() {
141136
}
142137

143138
print_gradle_command() {
144-
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
145139
info "./gradlew --no-build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} $*$(print_extra_args)"
146-
else
147-
info "./gradlew --no-build-cache -Dscan.dump -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} $*$(print_extra_args)"
148-
fi
149140
}
150141

151142
fetch_build_cache_metrics() {
152-
if [ "$build_scan_publishing_mode" == "on" ]; then
153-
process_build_scan_data_online
154-
else
155-
find_and_read_build_scan_dumps
156-
fi
143+
process_build_scan_data_online
157144
}
158145

159146
# Overrides summary.sh#print_performance_characteristics
@@ -271,8 +258,7 @@ EOF
271258

272259
explain_measure_build_results() {
273260
local text
274-
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
275-
IFS='' read -r -d '' text <<EOF
261+
IFS='' read -r -d '' text <<EOF
276262
$(print_separator)
277263
${HEADER_COLOR}Measure build results${RESTORE}
278264
@@ -285,30 +271,13 @@ the two builds to assist you in your investigation.
285271
286272
${USER_ACTION_COLOR}Press <Enter> to measure the build results.${RESTORE}
287273
EOF
288-
else
289-
IFS='' read -r -d '' text <<EOF
290-
$(print_separator)
291-
${HEADER_COLOR}Measure build results${RESTORE}
292-
293-
Now that the second build has finished successfully, you are ready to measure
294-
how well your build leverages Gradle’s incremental build functionality for the
295-
invoked set of Gradle tasks.
296-
297-
Some of the build scan data will be extracted from the locally stored,
298-
intermediate build data produced by the two builds to assist you in your
299-
investigation.
300-
301-
${USER_ACTION_COLOR}Press <Enter> to measure the build results.${RESTORE}
302-
EOF
303-
fi
304274
print_interactive_text "${text}"
305275
wait_for_enter
306276
}
307277

308278
explain_and_print_summary() {
309279
local text
310-
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
311-
IFS='' read -r -d '' text <<EOF
280+
IFS='' read -r -d '' text <<EOF
312281
The ‘Summary’ section below captures the configuration of the experiment and
313282
the two build scans that were published as part of running the experiment. The
314283
build scan of the second build is particularly interesting since this is where
@@ -331,23 +300,6 @@ $(print_command_to_repeat_experiment)
331300
332301
$(explain_when_to_rerun_experiment)
333302
EOF
334-
else
335-
IFS='' read -r -d '' text <<EOF
336-
The ‘Summary’ section below captures the configuration of the experiment. No
337-
build scans are available for inspection since publishing was disabled for the
338-
experiment.
339-
340-
$(explain_performance_characteristics)
341-
342-
$(explain_command_to_repeat_experiment)
343-
344-
$(print_summary)
345-
346-
$(print_command_to_repeat_experiment)
347-
348-
$(explain_when_to_rerun_experiment)
349-
EOF
350-
fi
351303
print_interactive_text "${text}"
352304
}
353305

Diff for: components/scripts/gradle/02-validate-local-build-caching-same-location.sh

+8-55
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,11 @@ execute() {
7272
wizard_execute() {
7373
print_introduction
7474

75-
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
76-
print_bl
77-
explain_prerequisites_ccud_gradle_plugin "I."
75+
print_bl
76+
explain_prerequisites_ccud_gradle_plugin "I."
7877

79-
print_bl
80-
explain_prerequisites_api_access "II."
81-
else
82-
print_bl
83-
explain_prerequisites_ccud_gradle_plugin
84-
fi
78+
print_bl
79+
explain_prerequisites_api_access "II."
8580

8681
print_bl
8782
explain_collect_git_details
@@ -146,19 +141,11 @@ execute_build() {
146141
}
147142

148143
print_gradle_command() {
149-
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
150-
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
151-
else
152-
info "./gradlew --build-cache -Dscan.dump -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
153-
fi
144+
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
154145
}
155146

156147
fetch_build_cache_metrics() {
157-
if [ "$build_scan_publishing_mode" == "on" ]; then
158-
process_build_scan_data_online
159-
else
160-
find_and_read_build_scan_dumps
161-
fi
148+
process_build_scan_data_online
162149
}
163150

164151
print_introduction() {
@@ -249,8 +236,7 @@ EOF
249236

250237
explain_measure_build_results() {
251238
local text
252-
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
253-
IFS='' read -r -d '' text <<EOF
239+
IFS='' read -r -d '' text <<EOF
254240
$(print_separator)
255241
${HEADER_COLOR}Measure build results${RESTORE}
256242
@@ -263,29 +249,13 @@ two builds to assist you in your investigation.
263249
264250
${USER_ACTION_COLOR}Press <Enter> to measure the build results.${RESTORE}
265251
EOF
266-
else
267-
IFS='' read -r -d '' text <<EOF
268-
$(print_separator)
269-
${HEADER_COLOR}Measure build results${RESTORE}
270-
271-
Now that the second build has finished successfully, you are ready to measure how
272-
well your build leverages Gradle’s local build caching functionality for the
273-
invoked set of Gradle tasks.
274-
275-
Some of the build scan data will be extracted from the locally stored, intermediate
276-
build data produced by the two builds to assist you in your investigation.
277-
278-
${USER_ACTION_COLOR}Press <Enter> to measure the build results.${RESTORE}
279-
EOF
280-
fi
281252
print_interactive_text "${text}"
282253
wait_for_enter
283254
}
284255

285256
explain_and_print_summary() {
286257
local text
287-
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
288-
IFS='' read -r -d '' text <<EOF
258+
IFS='' read -r -d '' text <<EOF
289259
The ‘Summary’ section below captures the configuration of the experiment and the
290260
two build scans that were published as part of running the experiment. The build
291261
scan of the second build is particularly interesting since this is where you can
@@ -307,23 +277,6 @@ $(print_command_to_repeat_experiment)
307277
308278
$(explain_when_to_rerun_experiment)
309279
EOF
310-
else
311-
IFS='' read -r -d '' text <<EOF
312-
The ‘Summary’ section below captures the configuration of the experiment. No
313-
build scans are available for inspection since publishing was disabled for the
314-
experiment.
315-
316-
$(explain_performance_characteristics)
317-
318-
$(explain_command_to_repeat_experiment)
319-
320-
$(print_summary)
321-
322-
$(print_command_to_repeat_experiment)
323-
324-
$(explain_when_to_rerun_experiment)
325-
EOF
326-
fi
327280
print_interactive_text "${text}"
328281
}
329282

Diff for: components/scripts/gradle/03-validate-local-build-caching-different-locations.sh

+8-56
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,11 @@ execute() {
7373
wizard_execute() {
7474
print_introduction
7575

76-
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
77-
print_bl
78-
explain_prerequisites_ccud_gradle_plugin "I."
76+
print_bl
77+
explain_prerequisites_ccud_gradle_plugin "I."
7978

80-
print_bl
81-
explain_prerequisites_api_access "II."
82-
else
83-
print_bl
84-
explain_prerequisites_ccud_gradle_plugin
85-
fi
79+
print_bl
80+
explain_prerequisites_api_access "II."
8681

8782
print_bl
8883
explain_collect_git_details
@@ -151,19 +146,11 @@ execute_build() {
151146
}
152147

153148
print_gradle_command() {
154-
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
155-
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
156-
else
157-
info "./gradlew --build-cache -Dscan.dump -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
158-
fi
149+
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
159150
}
160151

161152
fetch_build_cache_metrics() {
162-
if [ "$build_scan_publishing_mode" == "on" ]; then
163-
process_build_scan_data_online
164-
else
165-
find_and_read_build_scan_dumps
166-
fi
153+
process_build_scan_data_online
167154
}
168155

169156
print_introduction() {
@@ -286,8 +273,7 @@ EOF
286273

287274
explain_measure_build_results() {
288275
local text
289-
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
290-
IFS='' read -r -d '' text <<EOF
276+
IFS='' read -r -d '' text <<EOF
291277
$(print_separator)
292278
${HEADER_COLOR}Measure build results${RESTORE}
293279
@@ -300,30 +286,13 @@ two builds to assist you in your investigation.
300286
301287
${USER_ACTION_COLOR}Press <Enter> to measure the build results.${RESTORE}
302288
EOF
303-
else
304-
IFS='' read -r -d '' text <<EOF
305-
$(print_separator)
306-
${HEADER_COLOR}Measure build results${RESTORE}
307-
308-
Now that the second build has finished successfully, you are ready to measure how
309-
well your build leverages Gradle’s local build caching functionality for the
310-
invoked set of Gradle tasks.
311-
312-
Some of the build scan data will be extracted from the locally stored, intermediate
313-
build data produced by the two builds to assist you in your investigation.
314-
315-
${USER_ACTION_COLOR}Press <Enter> to measure the build results.${RESTORE}
316-
EOF
317-
fi
318289
print_interactive_text "${text}"
319290
wait_for_enter
320291
}
321292

322293
explain_and_print_summary() {
323294
local text
324-
325-
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
326-
IFS='' read -r -d '' text <<EOF
295+
IFS='' read -r -d '' text <<EOF
327296
The ‘Summary’ section below captures the configuration of the experiment and the
328297
two build scans that were published as part of running the experiment. The build
329298
scan of the second build is particularly interesting since this is where you can
@@ -345,23 +314,6 @@ $(print_command_to_repeat_experiment)
345314
346315
$(explain_when_to_rerun_experiment)
347316
EOF
348-
else
349-
IFS='' read -r -d '' text <<EOF
350-
The ‘Summary’ section below captures the configuration of the experiment. No
351-
build scans are available for inspection since publishing was disabled for the
352-
experiment.
353-
354-
$(explain_performance_characteristics)
355-
356-
$(explain_command_to_repeat_experiment)
357-
358-
$(print_summary)
359-
360-
$(print_command_to_repeat_experiment)
361-
362-
$(explain_when_to_rerun_experiment)
363-
EOF
364-
fi
365317
print_interactive_text "${text}"
366318
}
367319

Diff for: components/scripts/lib/build-scan-offline.sh

-53
This file was deleted.

0 commit comments

Comments
 (0)