Skip to content

Commit

Permalink
CBDC-1078 add jdk21 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Bisarnov committed Nov 13, 2023
1 parent 917103d commit 1ac4170
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
10 changes: 3 additions & 7 deletions projects/01-java-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
//plugins {
// id 'soramitsu'
// id 'application'
//}

buildscript {
repositories {
mavenLocal()
Expand All @@ -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'
Expand All @@ -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"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class DockerPlugin implements Plugin<Project> {
// 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"
Expand Down Expand Up @@ -277,6 +277,8 @@ class DockerPlugin implements Plugin<Project> {
flags << "-XX:MinRAMPercentage=50"
flags << "-XX:InitialRAMPercentage=50"
break
case 21:
break;
default:
throw new IllegalStateException(format("undefined/unsupported java version: ${version}"))
}
Expand All @@ -293,6 +295,8 @@ class DockerPlugin implements Plugin<Project> {
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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ac4170

Please sign in to comment.