Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 15 additions & 17 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,24 +93,22 @@ case ${JOB_TYPE} in
fi
;;
lint)
changed_file_list=$(git diff --name-only "${BASE_SHA}" "${HEAD_SHA}")
echo "${changed_file_list}"
has_code_change="false"
while IFS= read -r changed_file; do
if [ -n "${changed_file}" ] && [[ "${changed_file}" == *.java ]]; then
echo "Matched: ${changed_file}"
has_code_change="true"
break
fi
done <<< "${changed_file_list}"
if [ "${has_code_change}" == "false" ]; then
echo "No java modules affected. Skipping linter check."
exit 0
fi
# changed_file_list=$(git diff --name-only "${BASE_SHA}" "${HEAD_SHA}")
# echo "${changed_file_list}"
# has_code_change="false"
# while IFS= read -r changed_file; do
# if [ -n "${changed_file}" ] && [[ "${changed_file}" == *.java ]]; then
# echo "Matched: ${changed_file}"
# has_code_change="true"
# break
# fi
# done <<< "${changed_file_list}"
# if [ "${has_code_change}" == "false" ]; then
# echo "No java modules affected. Skipping linter check."
# exit 0
# fi

mvn -B -ntp \
-T 1.5C \
com.spotify.fmt:fmt-maven-plugin:check
mvn -B -ntp com.spotify.fmt:fmt-maven-plugin:check
mvn -B -ntp checkstyle:check@checkstyle
;;
*) ;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public static RemoteTranslateHelper create(String projectId, GoogleCredentials c
@Deprecated
public static RemoteTranslateHelper create(String apiKey) {
HttpTransportOptions transportOptions = TranslateOptions.getDefaultHttpTransportOptions();

transportOptions =
transportOptions.toBuilder().setConnectTimeout(60000).setReadTimeout(60000).build();
TranslateOptions translateOptions =
Expand Down
Loading