Merge pull request #632 from raboof/jdk11

Test on JDK 11
This commit is contained in:
Marcos Pereira 2019-06-23 17:08:26 -04:00 committed by GitHub
commit 558c1e22f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 5 deletions

View File

@ -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 adopt@1.8.202-08
- java -version
- curl -sL https://git.io/jabba | bash && . ~/.jabba/jabba.sh
- jabba install adopt@1.8.212-03
- jabba install adopt@1.11.0-3
script:
- jabba use $JDK
- java -version
- sbt ++$TRAVIS_SCALA_VERSION test doc
jobs:
include:
- env: JDK=adopt@1.8.212-03
- env: JDK=adopt@1.11.0-3
before_cache:
# Remove to avoid unnecessary cache updates
- find $HOME/.sbt -name "*.lock" -delete

View File

@ -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

View File

@ -302,7 +302,13 @@ public class ConfigImpl {
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;
}