Skip to content

Commit

Permalink
FDN-1807: Upgrade to java 17 (#280)
Browse files Browse the repository at this point in the history
* FDN-1807: Upgrade to java 17
  • Loading branch information
himanshuupadhyay101 authored Oct 27, 2023
1 parent adddd78 commit 5cf4086
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 24 deletions.
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

25 changes: 21 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
pipeline {
agent {
kubernetes {
inheritFrom 'default-dependence-day'
inheritFrom 'default'
containerTemplates([
containerTemplate(name: 'play', image: 'flowdocker/play_builder:latest-java17-jammy', command: 'cat', ttyEnabled: true),
])
}
}

Expand All @@ -25,11 +28,25 @@ pipeline {
}
}
}

stage('SBT Test') {
steps {
container('play') {
script {
try {
sh '''
sbt clean compile flowLintLib test doc
'''
} finally {
junit allowEmptyResults: true, testResults: '**/target/test-reports/*.xml'
}
}
}
}
}
stage('Release') {
when { branch 'main' }
steps {
container('dependence-day') {
container('play') {
withCredentials([
usernamePassword(
credentialsId: 'jenkins-x-jfrog',
Expand All @@ -44,4 +61,4 @@ pipeline {
}
}
}
}
}
9 changes: 8 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name := "lib-log"
organization := "io.flow"

scalaVersion := "2.13.10"
ThisBuild / javacOptions ++= Seq("-source", "17", "-target", "17")

enablePlugins(GitVersioning)
git.useGitDescribe := true
Expand All @@ -16,6 +17,7 @@ lazy val allScalacOptions = Seq(
"-Ypatmat-exhaust-depth", "100", // Fixes: Exhaustivity analysis reached max recursion depth, not all missing cases are reported.
"-Wconf:src=generated/.*:silent",
"-Wconf:src=target/.*:silent", // silence the unused imports errors generated by the Play Routes
"-release:17",
)

libraryDependencies ++= Seq(
Expand All @@ -24,14 +26,19 @@ libraryDependencies ++= Seq(
"com.google.inject.extensions" % "guice-assistedinject" % "4.2.3",
"org.typelevel" %% "cats-core" % "2.10.0",
"net.codingwell" %% "scala-guice" % "4.2.11",
"com.google.inject" % "guice" % "5.1.0",
"com.google.inject.extensions" % "guice-assistedinject" % "5.1.0",
"net.logstash.logback" % "logstash-logback-encoder" % "6.3", // structured logging to sumo
"org.scalatest" %% "scalatest" % "3.2.17" % Test,
"com.typesafe.play" %% "play-json" % "2.9.4",
"com.typesafe.play" %% "play-json-joda" % "2.9.4",
)

resolvers += "Artifactory" at "https://flow.jfrog.io/flow/libs-release/"

Test / javaOptions ++= Seq(
"--add-exports=java.base/sun.security.x509=ALL-UNNAMED",
"--add-opens=java.base/sun.security.ssl=ALL-UNNAMED"
)
credentials += Credentials(
"Artifactory Realm",
"flow.jfrog.io",
Expand Down

0 comments on commit 5cf4086

Please sign in to comment.