diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cb1c3b7..6e10e29a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,17 +24,11 @@ jobs: aws-region: eu-west-1 - uses: guardian/actions-setup-node@v2.4.1 - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - java-version: 8 - distribution: adopt - - name: Cache SBT - uses: actions/cache@v2 - with: - path: | - ~/.ivy2/cache - ~/.sbt - key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }} + distribution: corretto + java-version: 17 + cache: sbt - name: CI yarn shell: bash run: | diff --git a/.gitignore b/.gitignore index 28f39653..56a414d0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ node_modules/ public/build ensime-langserver.log pc.stdout.log +.bsp/ diff --git a/.java-version b/.java-version deleted file mode 100644 index 1f233b46..00000000 --- a/.java-version +++ /dev/null @@ -1 +0,0 @@ -1.8.0.232 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..8079c02f --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +java corretto-11.0.22.7.1 diff --git a/README.md b/README.md index 17e14d83..dc082f1c 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,15 @@ for both the composer and capi AWS accounts from [janus](https://janus.gutools.c This project requires Node, so we recommend you use [node version manager](https://github.com/nvm-sh/nvm) `nvm`. Run `brew install nvm` if you do not have it. Run `nvm use` in the root of the project to ensure you are using the right version of node. The project's node version is set in the `.nvmrc` file. -The project also requires Java version `1.8.0.232` (or lower). The easiest way to set this is with `jenv`: -- `brew install jenv` -- Download and install the appopriate Java version: [jdk8u232-b09](https://adoptopenjdk.net/archive.html) -- `jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/` +The project also requires Java 11. The [easiest](https://docs.google.com/document/d/1ZR-YnaXCT5_gLVmTCeGs0mWd3KPaAozPjQK8uUzHZ9w/edit#heading=h.kgqqi53p3ltt) +way to install this is with `asdf install`, which will install the version of `java` specified in our +[.tool-versions](.tool-versions) file: + +```shell +$ brew install asdf +$ asdf plugin add java +$ asdf install +``` You will then need to: diff --git a/app/AppLoader.scala b/app/AppLoader.scala index 4fc6494c..093d8d2d 100644 --- a/app/AppLoader.scala +++ b/app/AppLoader.scala @@ -26,7 +26,7 @@ class AppLoader extends ApplicationLoader { FileConfigurationLocation(new File(s"$home/.gu/$appName.conf")) } - new AppComponents(context.copy(initialConfiguration = context.initialConfiguration ++ Configuration(loadedConfig)), identity).application + new AppComponents(context.copy(initialConfiguration = context.initialConfiguration.withFallback(Configuration(loadedConfig))), identity).application } private def startLogging(context: Context): Unit = { diff --git a/build.sbt b/build.sbt index d409dd54..3df87a47 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ import Dependencies._ name := "atom-workshop" version := "1.0" -scalaVersion := "2.12.16" +scalaVersion := "2.13.12" libraryDependencies ++= dependencies diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 07210130..156bd020 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -3,7 +3,7 @@ import sbt._ object Dependencies { lazy val awsVersion = "1.11.678" - lazy val atomLibVersion = "1.4.0" + lazy val atomLibVersion = "2.0.0-PREVIEW.fix-tests-under-java-17.2024-01-18T1039.b4d55b3d" lazy val jacksonVersion = "2.13.4" lazy val jacksonDatabindVersion = "2.13.4.2" @@ -30,9 +30,9 @@ object Dependencies { "com.amazonaws" % "aws-java-sdk-kinesis" % awsVersion, "com.gu" %% "atom-manager-play" % atomLibVersion, "com.gu" %% "atom-publisher-lib" % atomLibVersion, - "com.gu" %% "editorial-permissions-client" % "2.0", + "com.gu" %% "editorial-permissions-client" % "2.14", "com.gu" %% "simple-configuration-ssm" % "1.5.6", - "com.gu" %% "fezziwig" % "1.2", + "com.gu" %% "fezziwig" % "1.6", "com.gu" %% "pan-domain-auth-play_2-8" % "1.2.0", "io.circe" %% "circe-parser" % "0.14.5", "net.logstash.logback" % "logstash-logback-encoder" % "6.6", diff --git a/project/build.properties b/project/build.properties index 8b9a0b0a..abbbce5d 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.0 +sbt.version=1.9.8 diff --git a/project/plugins.sbt b/project/plugins.sbt index bf992677..af7db2eb 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,7 +2,7 @@ logLevel := Level.Warn libraryDependencies += "org.vafer" % "jdeb" % "1.6" artifacts Artifact("jdeb", "jar", "jar") -addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.8") +addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.9.1") addSbtPlugin("com.gu" % "sbt-riffraff-artifact" % "1.1.18")