Merge pull request #5964 from rdesgroppes/detect-adoptopenjdk-on-macos

Detect AdoptOpenJDK on macOS
This commit is contained in:
eugene yokota 2020-10-11 13:12:15 -04:00 committed by GitHub
commit b806d3ed3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -388,7 +388,7 @@ private[sbt] object CrossJava {
object JavaDiscoverConfig {
object JavaHomeDir {
private val regex = """(\w+-)?(java-|jdk-?)(bin-)?(1\.)?([0-9]+).*""".r
private val regex = """(\w+-)?(java-|(?:adoptopen)?jdk-?)(bin-)?(1\.)?([0-9]+).*""".r
def unapply(s: CharSequence): Option[String] = {
s match {
case regex(vendor, _, _, m, n) => Some(JavaVersion(nullBlank(m) + n).toString)