{
  "patterns": ["\\bjava\\b"],
  "dependencies": [
    {
      "post_install": [
        {
          "command": "R CMD javareconf"
        }
      ],
      "packages": ["default-jdk"],
      "constraints": [
        {
          "os": "linux",
          "distribution": "ubuntu"
        },
        {
          "os": "linux",
          "distribution": "debian"
        }
      ]
    },
    {
      "post_install": [
        {
          "command": "R CMD javareconf"
        }
      ],
      "packages": ["java-1.8.0-openjdk-devel"],
      "constraints": [
        {
          "os": "linux",
          "distribution": "centos"
        },
        {
          "os": "linux",
          "distribution": "redhat",
          "versions": ["7", "8"]
        }
      ]
    },
    {
      "post_install": [
        { "command": "R CMD javareconf" }
      ],
      "packages": ["java-11-openjdk-devel"],
      "constraints": [
        {
          "os": "linux",
          "distribution": "rockylinux"
        },
        {
          "os": "linux",
          "distribution": "redhat",
          "versions": ["9"]
        },
        {
          "os": "linux",
          "distribution": "fedora"
        }
      ]
    },
    {
      "post_install": [
        {
          "command": "R CMD javareconf"
        }
      ],
      "packages": ["java-1_8_0-openjdk-devel"],
      "constraints": [
        {
          "os": "linux",
          "distribution": "opensuse",
          "versions": ["15.3"]
        },
        {
          "os": "linux",
          "distribution": "sle",
          "versions": ["15.3"]
        }
      ]
    },
    {
      "post_install": [
        {
          "command": "R CMD javareconf"
        }
      ],
      "packages": ["java-11-openjdk-devel"],
      "constraints": [
        {
          "os": "linux",
          "distribution": "opensuse",
          "versions": ["15.4", "15.5", "15.6"]
        },
        {
          "os": "linux",
          "distribution": "sle",
          "versions": ["15.4", "15.5", "15.6"]
        }
      ]
    },
    {
      "packages": ["java-jdk"],
      "constraints": [
        {
          "os": "linux",
          "distribution": "alpine"
        }
      ]
    }
  ]
}
