diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 070cb70..e411586 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/projects/01-java-app/build.gradle b/projects/01-java-app/build.gradle index b453883..5f7ce04 100644 --- a/projects/01-java-app/build.gradle +++ b/projects/01-java-app/build.gradle @@ -1,8 +1,3 @@ -//plugins { -// id 'soramitsu' -// id 'application' -//} - buildscript { repositories { mavenLocal() @@ -11,6 +6,7 @@ buildscript { dependencies { classpath 'jp.co.soramitsu:sora-plugin:+' } } } + apply plugin: 'jp.co.soramitsu.sora-plugin' apply plugin: 'application' apply plugin: 'java' @@ -31,9 +27,9 @@ soramitsu { baseImage = 'openjdk:11-jre-slim' jar = new File("build/libs/${project.name}-${project.version}.jar") files = [ - "build.gradle":"/build.gradle", + "build.gradle" : "/build.gradle", "settings.gradle": "/1/settings.gradle", - "gradlew": "/1/2/gradlew" + "gradlew" : "/1/2/gradlew" ] } } diff --git a/projects/01-java-app/gradle/wrapper/gradle-wrapper.properties b/projects/01-java-app/gradle/wrapper/gradle-wrapper.properties index 070cb70..e411586 100644 --- a/projects/01-java-app/gradle/wrapper/gradle-wrapper.properties +++ b/projects/01-java-app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/projects/02-java-lib/gradle/wrapper/gradle-wrapper.properties b/projects/02-java-lib/gradle/wrapper/gradle-wrapper.properties index 070cb70..e411586 100644 --- a/projects/02-java-lib/gradle/wrapper/gradle-wrapper.properties +++ b/projects/02-java-lib/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/projects/03-kotlin-app/gradle/wrapper/gradle-wrapper.properties b/projects/03-kotlin-app/gradle/wrapper/gradle-wrapper.properties index 070cb70..e411586 100644 --- a/projects/03-kotlin-app/gradle/wrapper/gradle-wrapper.properties +++ b/projects/03-kotlin-app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/projects/04-kotlin-lib/gradle/wrapper/gradle-wrapper.properties b/projects/04-kotlin-lib/gradle/wrapper/gradle-wrapper.properties index 070cb70..e411586 100644 --- a/projects/04-kotlin-lib/gradle/wrapper/gradle-wrapper.properties +++ b/projects/04-kotlin-lib/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/projects/05-java-spring-app/gradle/wrapper/gradle-wrapper.properties b/projects/05-java-spring-app/gradle/wrapper/gradle-wrapper.properties index 070cb70..e411586 100644 --- a/projects/05-java-spring-app/gradle/wrapper/gradle-wrapper.properties +++ b/projects/05-java-spring-app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy b/src/main/groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy index f129d1d..622ee70 100644 --- a/src/main/groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy +++ b/src/main/groovy/jp/co/soramitsu/devops/docker/DockerPlugin.groovy @@ -218,7 +218,7 @@ class DockerPlugin implements Plugin { // setup tiny https://github.com/krallin/tini t.runCommand "apk add --no-cache tini" t.runCommand "addgroup -S appuser && adduser -S -G appuser appuser" - } else { + } else { // setup tiny https://github.com/krallin/tini t.addFile "https://github.com/krallin/tini/releases/download/v0.19.0/tini", "/sbin/tini" t.runCommand "chmod +x /sbin/tini" @@ -277,6 +277,8 @@ class DockerPlugin implements Plugin { flags << "-XX:MinRAMPercentage=50" flags << "-XX:InitialRAMPercentage=50" break + case 21: + break; default: throw new IllegalStateException(format("undefined/unsupported java version: ${version}")) } @@ -293,6 +295,8 @@ class DockerPlugin implements Plugin { return 'openjdk:13' } else if (javaVersion == 17) { return 'openjdk:17-jdk-slim' + } else if (javaVersion == 21) { + return 'amazoncorretto:21-alpine3.18-jdk' } else { // default fallback version return 'openjdk:8-jre-alpine' diff --git a/src/test/groovy/jp/co/soramitsu/devops/utils/BaseIntegrationTest.groovy b/src/test/groovy/jp/co/soramitsu/devops/utils/BaseIntegrationTest.groovy index cce066d..fa63116 100644 --- a/src/test/groovy/jp/co/soramitsu/devops/utils/BaseIntegrationTest.groovy +++ b/src/test/groovy/jp/co/soramitsu/devops/utils/BaseIntegrationTest.groovy @@ -8,7 +8,7 @@ import spock.lang.TempDir import java.nio.file.Path class BaseIntegrationTest extends Specification { - private static final String defaultGradleVersion = '7.4' + private static final String defaultGradleVersion = '8.4' @TempDir Path testProjectDir diff --git a/src/test/groovy/jp/co/soramitsu/devops/utils/GradleProjectExecutor.groovy b/src/test/groovy/jp/co/soramitsu/devops/utils/GradleProjectExecutor.groovy index cadbf8a..868dd5b 100644 --- a/src/test/groovy/jp/co/soramitsu/devops/utils/GradleProjectExecutor.groovy +++ b/src/test/groovy/jp/co/soramitsu/devops/utils/GradleProjectExecutor.groovy @@ -12,7 +12,7 @@ class GradleProjectExecutor { Logger logger = LoggerFactory.getLogger(GradleProjectExecutor.class) - private static final String defaultGradleVersion = '7.4' + private static final String defaultGradleVersion = '8.4' File projectDir protected File buildFile