For a while now, Gradle has new actions for setup and validation, see https://github.com/gradle/actions/blob/main/docs/deprecation-upgrade-guide.md.