Skip to content

Commit

Permalink
Remove support for offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jthurne committed May 3, 2024
1 parent 031b900 commit 77b69fc
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 370 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ group = "com.gradle"
repositories {
maven {
name = "Solutions"
url = uri("https://repo.gradle.org/artifactory/solutions")
url = uri("https://repo.grdev.net/artifactory/solutions")
credentials {
username = providers
.environmentVariable("GRADLE_SOLUTIONS_REPOSITORY_USERNAME")
Expand Down
62 changes: 7 additions & 55 deletions components/scripts/gradle/01-validate-incremental-building.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,11 @@ execute() {
wizard_execute() {
print_introduction

if [[ "${build_scan_publishing_mode}" == "on" ]]; then
print_bl
explain_prerequisites_ccud_gradle_plugin "I."
print_bl
explain_prerequisites_ccud_gradle_plugin "I."

print_bl
explain_prerequisites_api_access "II."
else
print_bl
explain_prerequisites_ccud_gradle_plugin
fi
print_bl
explain_prerequisites_api_access "II."

print_bl
explain_collect_git_details
Expand Down Expand Up @@ -141,19 +136,11 @@ execute_build() {
}

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

fetch_build_cache_metrics() {
if [ "$build_scan_publishing_mode" == "on" ]; then
process_build_scan_data_online
else
find_and_read_build_scan_dumps
fi
process_build_scan_data_online
}

# Overrides summary.sh#print_performance_characteristics
Expand Down Expand Up @@ -271,8 +258,7 @@ EOF

explain_measure_build_results() {
local text
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
IFS='' read -r -d '' text <<EOF
IFS='' read -r -d '' text <<EOF
$(print_separator)
${HEADER_COLOR}Measure build results${RESTORE}
Expand All @@ -285,30 +271,13 @@ the two builds to assist you in your investigation.
${USER_ACTION_COLOR}Press <Enter> to measure the build results.${RESTORE}
EOF
else
IFS='' read -r -d '' text <<EOF
$(print_separator)
${HEADER_COLOR}Measure build results${RESTORE}
Now that the second build has finished successfully, you are ready to measure
how well your build leverages Gradle’s incremental build functionality for the
invoked set of Gradle tasks.
Some of the build scan data will be extracted from the locally stored,
intermediate build data produced by the two builds to assist you in your
investigation.
${USER_ACTION_COLOR}Press <Enter> to measure the build results.${RESTORE}
EOF
fi
print_interactive_text "${text}"
wait_for_enter
}

explain_and_print_summary() {
local text
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
IFS='' read -r -d '' text <<EOF
IFS='' read -r -d '' text <<EOF
The ‘Summary’ section below captures the configuration of the experiment and
the two build scans that were published as part of running the experiment. The
build scan of the second build is particularly interesting since this is where
Expand All @@ -331,23 +300,6 @@ $(print_command_to_repeat_experiment)
$(explain_when_to_rerun_experiment)
EOF
else
IFS='' read -r -d '' text <<EOF
The ‘Summary’ section below captures the configuration of the experiment. No
build scans are available for inspection since publishing was disabled for the
experiment.
$(explain_performance_characteristics)
$(explain_command_to_repeat_experiment)
$(print_summary)
$(print_command_to_repeat_experiment)
$(explain_when_to_rerun_experiment)
EOF
fi
print_interactive_text "${text}"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,11 @@ execute() {
wizard_execute() {
print_introduction

if [[ "${build_scan_publishing_mode}" == "on" ]]; then
print_bl
explain_prerequisites_ccud_gradle_plugin "I."
print_bl
explain_prerequisites_ccud_gradle_plugin "I."

print_bl
explain_prerequisites_api_access "II."
else
print_bl
explain_prerequisites_ccud_gradle_plugin
fi
print_bl
explain_prerequisites_api_access "II."

print_bl
explain_collect_git_details
Expand Down Expand Up @@ -146,19 +141,11 @@ execute_build() {
}

print_gradle_command() {
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
else
info "./gradlew --build-cache -Dscan.dump -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
fi
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
}

fetch_build_cache_metrics() {
if [ "$build_scan_publishing_mode" == "on" ]; then
process_build_scan_data_online
else
find_and_read_build_scan_dumps
fi
process_build_scan_data_online
}

print_introduction() {
Expand Down Expand Up @@ -249,8 +236,7 @@ EOF

explain_measure_build_results() {
local text
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
IFS='' read -r -d '' text <<EOF
IFS='' read -r -d '' text <<EOF
$(print_separator)
${HEADER_COLOR}Measure build results${RESTORE}
Expand All @@ -263,29 +249,13 @@ two builds to assist you in your investigation.
${USER_ACTION_COLOR}Press <Enter> to measure the build results.${RESTORE}
EOF
else
IFS='' read -r -d '' text <<EOF
$(print_separator)
${HEADER_COLOR}Measure build results${RESTORE}
Now that the second build has finished successfully, you are ready to measure how
well your build leverages Gradle’s local build caching functionality for the
invoked set of Gradle tasks.
Some of the build scan data will be extracted from the locally stored, intermediate
build data produced by the two builds to assist you in your investigation.
${USER_ACTION_COLOR}Press <Enter> to measure the build results.${RESTORE}
EOF
fi
print_interactive_text "${text}"
wait_for_enter
}

explain_and_print_summary() {
local text
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
IFS='' read -r -d '' text <<EOF
IFS='' read -r -d '' text <<EOF
The ‘Summary’ section below captures the configuration of the experiment and the
two build scans that were published as part of running the experiment. The build
scan of the second build is particularly interesting since this is where you can
Expand All @@ -307,23 +277,6 @@ $(print_command_to_repeat_experiment)
$(explain_when_to_rerun_experiment)
EOF
else
IFS='' read -r -d '' text <<EOF
The ‘Summary’ section below captures the configuration of the experiment. No
build scans are available for inspection since publishing was disabled for the
experiment.
$(explain_performance_characteristics)
$(explain_command_to_repeat_experiment)
$(print_summary)
$(print_command_to_repeat_experiment)
$(explain_when_to_rerun_experiment)
EOF
fi
print_interactive_text "${text}"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,11 @@ execute() {
wizard_execute() {
print_introduction

if [[ "${build_scan_publishing_mode}" == "on" ]]; then
print_bl
explain_prerequisites_ccud_gradle_plugin "I."
print_bl
explain_prerequisites_ccud_gradle_plugin "I."

print_bl
explain_prerequisites_api_access "II."
else
print_bl
explain_prerequisites_ccud_gradle_plugin
fi
print_bl
explain_prerequisites_api_access "II."

print_bl
explain_collect_git_details
Expand Down Expand Up @@ -151,19 +146,11 @@ execute_build() {
}

print_gradle_command() {
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
else
info "./gradlew --build-cache -Dscan.dump -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
fi
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
}

fetch_build_cache_metrics() {
if [ "$build_scan_publishing_mode" == "on" ]; then
process_build_scan_data_online
else
find_and_read_build_scan_dumps
fi
process_build_scan_data_online
}

print_introduction() {
Expand Down Expand Up @@ -286,8 +273,7 @@ EOF

explain_measure_build_results() {
local text
if [[ "${build_scan_publishing_mode}" == "on" ]]; then
IFS='' read -r -d '' text <<EOF
IFS='' read -r -d '' text <<EOF
$(print_separator)
${HEADER_COLOR}Measure build results${RESTORE}
Expand All @@ -300,30 +286,13 @@ two builds to assist you in your investigation.
${USER_ACTION_COLOR}Press <Enter> to measure the build results.${RESTORE}
EOF
else
IFS='' read -r -d '' text <<EOF
$(print_separator)
${HEADER_COLOR}Measure build results${RESTORE}
Now that the second build has finished successfully, you are ready to measure how
well your build leverages Gradle’s local build caching functionality for the
invoked set of Gradle tasks.
Some of the build scan data will be extracted from the locally stored, intermediate
build data produced by the two builds to assist you in your investigation.
${USER_ACTION_COLOR}Press <Enter> to measure the build results.${RESTORE}
EOF
fi
print_interactive_text "${text}"
wait_for_enter
}

explain_and_print_summary() {
local text

if [[ "${build_scan_publishing_mode}" == "on" ]]; then
IFS='' read -r -d '' text <<EOF
IFS='' read -r -d '' text <<EOF
The ‘Summary’ section below captures the configuration of the experiment and the
two build scans that were published as part of running the experiment. The build
scan of the second build is particularly interesting since this is where you can
Expand All @@ -345,23 +314,6 @@ $(print_command_to_repeat_experiment)
$(explain_when_to_rerun_experiment)
EOF
else
IFS='' read -r -d '' text <<EOF
The ‘Summary’ section below captures the configuration of the experiment. No
build scans are available for inspection since publishing was disabled for the
experiment.
$(explain_performance_characteristics)
$(explain_command_to_repeat_experiment)
$(print_summary)
$(print_command_to_repeat_experiment)
$(explain_when_to_rerun_experiment)
EOF
fi
print_interactive_text "${text}"
}

Expand Down
53 changes: 0 additions & 53 deletions components/scripts/lib/build-scan-offline.sh

This file was deleted.

Loading

0 comments on commit 77b69fc

Please sign in to comment.