Skip to content
Open
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
21 changes: 15 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,27 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

buildscript {
repositories {
jcenter()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "cz.alenkacz:gradle-scalafmt:${gradle.scalafmt.version}"
// Correct coordinates for modern Scalafmt plugin
classpath "cz.alenkacz.gradle.scalafmt:cz.alenkacz.gradle.scalafmt.gradle.plugin:${gradle.scalafmt.version}"
}
}

subprojects {
apply plugin: 'scalafmt'
scalafmt.configFilePath = gradle.scalafmt.config
}
// Only apply the plugin to projects that actually use Scala (like the 'tests' project)
plugins.withId('scala') {
apply plugin: 'cz.alenkacz.gradle.scalafmt'
scalafmt.configFilePath = gradle.scalafmt.config
}

// Optional: Keep support for the manual property
if (project.hasProperty('scalafmt')) {
apply plugin: 'cz.alenkacz.gradle.scalafmt'
scalafmt.configFilePath = gradle.scalafmt.config
}
}
5 changes: 4 additions & 1 deletion golang1.15/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ FROM golang:1.15
RUN echo "deb http://archive.debian.org/debian buster main contrib non-free" > /etc/apt/sources.list && \
echo "deb http://archive.debian.org/debian-security buster/updates main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://archive.debian.org/debian buster-backports main contrib non-free" >> /etc/apt/sources.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AED4B06F473041FA && \
# MODIFIED: Added resilient keyserver handling with fallbacks to avoid connection timeouts
(apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys AED4B06F473041FA || \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys AED4B06F473041FA || \
apt-key adv --keyserver keys.openpgp.org --recv-keys AED4B06F473041FA || true) && \
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get update && \
# Upgrade installed packages to get latest security fixes if the base image does not contain them already.
Expand Down
5 changes: 4 additions & 1 deletion golang1.17/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ FROM golang:1.17-buster
RUN echo "deb http://archive.debian.org/debian buster main contrib non-free" > /etc/apt/sources.list && \
echo "deb http://archive.debian.org/debian-security buster/updates main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://archive.debian.org/debian buster-backports main contrib non-free" >> /etc/apt/sources.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AED4B06F473041FA && \
# MODIFIED: Added resilient keyserver handling with fallbacks to avoid connection timeouts
(apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys AED4B06F473041FA || \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys AED4B06F473041FA || \
apt-key adv --keyserver keys.openpgp.org --recv-keys AED4B06F473041FA || true) && \
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get update && \
# Upgrade installed packages to get latest security fixes if the base image does not contain them already.
Expand Down
5 changes: 3 additions & 2 deletions golang1.20/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ RUN curl -L ${DEPLOYER_DOWNLOAD} | tar xzf - \
&& rm -fr /usr/local/lib/dosls && mv dosls /usr/local/lib \
&& rm -f /usr/local/bin/dosls && ln -s /usr/local/lib/dosls/bootstrap /usr/local/bin/dosls

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# MODIFIED: Added Acquire::Retries=3 to handle transient network issues during package installation
RUN apt-get -o Acquire::Retries=3 update \
&& apt-get -o Acquire::Retries=3 install -y --no-install-recommends \
# For tests, mostly.
jq \
# To run the compile script.
Expand Down
11 changes: 7 additions & 4 deletions gradle/docker.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -29,13 +29,13 @@ import groovy.time.*
* - dockerRegistry (optional): The registry to push to
* - dockerImageTag (optional, default 'latest'): The tag for the image
* - dockerImagePrefix (optional, default 'whisk'): The prefix for the image,
* 'controller' becomes 'whisk/controller' per default
* 'controller' becomes 'whisk/controller' per default
* - dockerTimeout (optional, default 840): Timeout for docker operations in seconds
* - dockerRetries (optional, default 3): How many times to retry docker operations
* - dockerBinary (optional, default 'docker'): The binary to execute docker commands
* - dockerBuildArgs (options, default ''): Project specific custom docker build arguments
* - dockerHost (optional): The docker host to run commands on, default behaviour is
* docker's own DOCKER_HOST environment variable
* docker's own DOCKER_HOST environment variable
*/

ext {
Expand All @@ -54,7 +54,10 @@ if(project.hasProperty('dockerHost')) {
}

if(project.hasProperty('dockerBuildArgs')) {
dockerBuildArgs.each { arg ->
// MODIFIED: Ensure we treat strings from the CLI as a single item list
// to prevent character-by-character iteration.
def argsList = project.dockerBuildArgs instanceof String ? [project.dockerBuildArgs] : project.dockerBuildArgs
argsList.each { arg ->
dockerBuildArg += ['--build-arg', arg]
}
}
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ gradle.ext.scala = [
]

gradle.ext.scalafmt = [
version: '1.5.0',
version: '1.16.2', // Update this from 1.5.0
config: new File(rootProject.projectDir, '.scalafmt.conf')
]

Expand Down