Skip to content

Commit

Permalink
chore: Drop JDK 8
Browse files Browse the repository at this point in the history
  • Loading branch information
patriknw committed Sep 27, 2023
1 parent a632104 commit a52d51a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 18 deletions.
1 change: 0 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
fail-fast: false
matrix:
include:
- { jdkVersion: "1.8.0", jvmName: "temurin:1.8.0", extraOpts: '' }
- { jdkVersion: "1.11.0", jvmName: "temurin:1.11.0", extraOpts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '' }
steps:
Expand Down
2 changes: 1 addition & 1 deletion integration-test/aws-api-ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Step 1: Launch Instances

From the AWS Management Console, provision a few EC2 instances (you'll need at least 2). Recommended image: Ubuntu Server 16.04. As for the instance type, this demo app runs fine even on t1.micro instances. As for the security group,
for now, just select the default one and make sure you allow yourself ssh access to your instances. Once the instances are ready,
ssh into them - you may need to install Java 8 ( you can use this [guide](https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04)).
ssh into them - you may need to install Java 11 ( you can use this [guide](https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04)).


Step 2: Create IAM Role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"UserData": {
"Fn::Base64": {
"Fn::Join": ["", ["#!/bin/bash -xe\n",
"sudo yum install -y java-1.8.0\n",
"sudo yum install -y java-11-openjdk\n",
"sudo yum remove -y java-1.7.0-openjdk\n",
"wget ", {"Ref": "Build"}, "\n",
"export PURPOSE=", {"Ref": "Purpose"}, "\n",
Expand Down Expand Up @@ -227,4 +227,4 @@
"Description": "ASG name"
}
}
}
}
4 changes: 1 addition & 3 deletions integration-test/kubernetes-api-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
</licenses>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<encoding>UTF-8</encoding>
<akka.version>2.8.2</akka.version>
<akka.http.version>10.5.1</akka.http.version>
Expand Down Expand Up @@ -135,7 +133,7 @@
<image>
<name>integration-test-kubernetes-api:1.3.3.7</name>
<build>
<from>openjdk:8-jre-alpine</from>
<from>docker.io/library/eclipse-temurin:17.0.8.1_1-jre</from>
<ports>
<port>8080</port>
<port>8558</port>
Expand Down
18 changes: 8 additions & 10 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,8 @@ object Common extends AutoPlugin {
javacOptions ++= Seq(
"-Xlint:unchecked"
),
javacOptions ++= (
if (isJdk8) Seq.empty
else Seq("--release", "8")
),
scalacOptions ++= (
if (isJdk8) Seq.empty
else Seq("--release", "8")
),
javacOptions ++= Seq("--release", "11"),
scalacOptions ++= Seq("--release", "11"),
doc / javacOptions := Nil,
Compile / doc / scalacOptions := scalacOptions.value ++ Seq(
"-doc-title",
Expand Down Expand Up @@ -99,6 +93,10 @@ object Common extends AutoPlugin {
sonatypeProfileName := "com.lightbend"
)

private def isJdk8 =
VersionNumber(sys.props("java.specification.version")).matchesSemVer(SemanticSelector(s"=1.8"))
val isJdk11orHigher: Boolean = {
val result = VersionNumber(sys.props("java.specification.version")).matchesSemVer(SemanticSelector(">=11"))
if (!result)
throw new IllegalArgumentException("JDK 11 or higher is required")
result
}
}
2 changes: 1 addition & 1 deletion project/project-info.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project-info {
version: "current"
scala-versions: ["2.13", "3.3"]
shared-info {
jdk-versions: ["Adopt OpenJDK 8 with Hotspot", "Adopt OpenJDK 11 with Hotspot"]
jdk-versions: ["Eclipse Temurin JDK 11", "Eclipse Temurin JDK 17"]
snapshots: {
url: "https://oss.sonatype.org/content/repositories/snapshots/com/lightbend/akka/management/"
text: "Snapshots are available"
Expand Down

0 comments on commit a52d51a

Please sign in to comment.