Installig openjdk8 fails with “travis_setup_java: command not found”

Configuration .travis.yml

language: java
jdk:
  - openjdk8
sudo: required

services:
- docker

cache:
  directories:
  - "$HOME/.gradle/caches/"
  - "$HOME/.gradle/wrapper/"

install:
- sudo pip install --quiet ansible==2.5.5

before_install:
 - chmod +x gradlew

script:
- "./gradlew check"
- "./gradlew codeCoverageReport"

after_success:
- "bash <(curl -s https://codecov.io/bash)"

deploy:
- provider: script
  script: bash travis/deploy/deploy.sh
  skip_cleanup: true
  on:
    all_branches: true
    condition: $TRAVIS_BRANCH =~ ^(staging|master|dev)$

Output:

Installing openjdk8
travis_setup_java: command not found

java -Xmx32m -version openjdk version "11.0.2" 2019-01-15 OpenJDK Runtime Environment 18.9 (build 11.0.2+9) OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode) javac -J-Xmx32m -version
javac 11.0.2

See my reply in this thread.