-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Java 11 #4329
Merged
Merged
Update to Java 11 #4329
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.8 | ||
11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
java corretto-11.0.24.8.1 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,11 @@ import com.typesafe.sbt.packager.debian.JDebPackaging | |
ThisBuild / packageOptions += FixedTimestamp(Package.keepTimestamps) | ||
|
||
val commonSettings = Seq( | ||
scalaVersion := "2.12.15", | ||
scalaVersion := "2.12.20", | ||
description := "grid", | ||
organization := "com.gu", | ||
version := "0.1", | ||
scalacOptions ++= Seq("-feature", "-deprecation", "-language:higherKinds", "-Xfatal-warnings"), | ||
scalacOptions ++= Seq("-feature", "-deprecation", "-language:higherKinds", "-Xfatal-warnings", "-release:11"), | ||
|
||
// The Java SDK uses CBOR protocol | ||
// We use localstack in TEST. Kinesis in localstack uses kinesislite which requires CBOR to be disabled | ||
|
@@ -220,7 +220,7 @@ def playProject(projectName: String, port: Int, path: Option[String] = None): Pr | |
.dependsOn(restLib) | ||
.settings(commonSettings ++ buildInfo ++ Seq( | ||
playDefaultPort := port, | ||
debianPackageDependencies := Seq("openjdk-8-jre-headless"), | ||
debianPackageDependencies := Seq("java11-runtime-headless"), | ||
Linux / maintainer := "Guardian Developers <[email protected]>", | ||
Linux / packageSummary := description.value, | ||
packageDescription := description.value, | ||
|
@@ -244,9 +244,8 @@ def playProject(projectName: String, port: Int, path: Option[String] = None): Pr | |
"-Dpidfile.path=/dev/null", | ||
s"-Dconfig.file=/usr/share/$projectName/conf/application.conf", | ||
s"-Dlogger.file=/usr/share/$projectName/conf/logback.xml", | ||
"-J-XX:+PrintGCDetails", | ||
"-J-XX:+PrintGCDateStamps", | ||
s"-J-Xloggc:/var/log/$projectName/gc.log", | ||
"-J-Xlog:gc*", | ||
s"-J-Xlog:gc:/var/log/$projectName/gc.log", | ||
"-J-XX:+UseGCLogFileRotation", | ||
"-J-XX:NumberOfGCLogFiles=5", | ||
"-J-XX:GCLogFileSize=2M" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.6.2 | ||
sbt.version=1.10.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,18 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.4") | |
|
||
addSbtPlugin("com.typesafe.sbt" % "sbt-gzip" % "1.0.2") | ||
|
||
// needed by Snyk to accurately report vulnerabilities | ||
// https://docs.snyk.io/scan-application-code/snyk-open-source/snyk-open-source-supported-languages-and-package-managers/snyk-for-scala | ||
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.10.0-RC1") | ||
Comment on lines
-17
to
-19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
/* | ||
Without setting VersionScheme.Always here on `scala-xml`, sbt 1.8.0 will raise fatal 'version conflict' errors when | ||
used with sbt plugins like `sbt-native-packager`, which currently use sort-of-incompatible versions of the `scala-xml` | ||
library. sbt 1.8.0 has upgraded to Scala 2.12.17, which has itself upgraded to `scala-xml` 2.1.0 | ||
(see https://github.com/sbt/sbt/releases/tag/v1.8.0), but `sbt-native-packager` is currently using `scala-xml` 1.1.1, | ||
and the `scala-xml` library declares that it uses specifically 'early-semver' version compatibility (see | ||
https://www.scala-lang.org/blog/2021/02/16/preventing-version-conflicts-with-versionscheme.html#versionscheme-librarydependencyschemes-and-sbt-150 ), | ||
meaning that for version x.y.z, `x` & `y` *must match exactly* for versions to be considered compatible by sbt. | ||
By setting VersionScheme.Always here on `scala-xml`, we're overriding its declared version-compatability scheme, | ||
choosing to tolerate the risk of binary incompatibility. We consider this to be safe because when set under | ||
`projects/` (ie *not* in `build.sbt` itself) it only affects the compilation of build.sbt, not of the application | ||
build itself. Once the build has succeeded, there is no further risk (ie of a runtime exception due to clashing | ||
versions of `scala-xml`). | ||
*/ | ||
libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this file for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an
asdf
-formatted.tool-versions
file - I'm trying to nudge people towards standardising on it (see guardian/gha-scala-library-release-workflow#36) and thought I'd add it in here. It does a very similar job to the .java-version file that's already in the project, which I think is a jEnv thing.