Skip to content

Commit

Permalink
Merge pull request lightbend#632 from raboof/jdk11
Browse files Browse the repository at this point in the history
Test on JDK 11
  • Loading branch information
Marcos Pereira authored Jun 23, 2019
2 parents 8fc33c8 + 8d51f67 commit 558c1e2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
13 changes: 10 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ language: scala

before_install:
# using jabba for custom jdk management
- curl -sL https://raw.githubusercontent.com/shyiko/jabba/0.11.2/install.sh | bash && . ~/.jabba/jabba.sh
- jabba install [email protected].202-08
- java -version
- curl -sL https://git.io/jabba | bash && . ~/.jabba/jabba.sh
- jabba install [email protected].212-03
- jabba install [email protected]

script:
- jabba use $JDK
- java -version
- sbt ++$TRAVIS_SCALA_VERSION test doc

jobs:
include:
- env: [email protected]
- env: [email protected]

before_cache:
# Remove to avoid unnecessary cache updates
- find $HOME/.sbt -name "*.lock" -delete
Expand Down
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ lazy val commonSettings: Seq[Setting[_]] = Def.settings(
unpublished,
scalariformPreferences := scalariformPreferences.value
.setPreference(IndentSpaces, 4)
.setPreference(FirstArgumentOnNewline, Preserve)
.setPreference(FirstArgumentOnNewline, Preserve),
Compile / compile / javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
)

def proj(id: String, base: File) = Project(id, base) settings commonSettings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,13 @@ private static Properties getSystemProperties() {
final Properties systemProperties = System.getProperties();
final Properties systemPropertiesCopy = new Properties();
synchronized (systemProperties) {
systemPropertiesCopy.putAll(systemProperties);
for (Map.Entry<Object, Object> entry: systemProperties.entrySet()) {
// Java 11 introduces 'java.version.date', but we don't want that to
// overwrite 'java.version'
if (!entry.getKey().toString().startsWith("java.version.")) {
systemPropertiesCopy.put(entry.getKey(), entry.getValue());
}
}
}
return systemPropertiesCopy;
}
Expand Down

0 comments on commit 558c1e2

Please sign in to comment.