asciidoctor-gradle-plugin icon indicating copy to clipboard operation
asciidoctor-gradle-plugin copied to clipboard

Add Java17 support

Open abelsromero opened this issue 4 years ago • 1 comments

Ensure running on Java17 JVM.

Side note Spring 6 and SpringBoot 3 will use Java17 as baseline (Q4 2022). Not only that means a hugh spike in ppl upgrading, but Spring team uses the plugin so they'll be testing it before that date.

abelsromero avatar Oct 03 '21 08:10 abelsromero

I work on it and right now is not possible given gradleTest incompaibilties, here is the full list of findings so far.

  • We need to upgrade to Gradle 7.2 (current 5.5.1). While I found no official statement about compatibility, that version is the fist to work fine with Java17 based on a few migrations I've done.
  • buildScan plugin is not supported in 7.2, instead we need to use gradleEnterpise which is available by default. So, we need to remove the plugin configura from build.gradle and update it as follows in settings.gradle (https://docs.gradle.com/enterprise/gradle-plugin/).
plugins {
    id 'com.gradle.enterprise' version '3.7'
}

gradleEnterprise {
    buildScan {
        termsOfServiceUrl = 'https://gradle.com/terms-of-service'
        termsOfServiceAgree = 'yes'

        buildFinished { buildResult ->
            buildScanPublished { scan ->
                ['curl', '-s', '-d', "message=asciidoctor-gradle-plugin build scan: ${scan.buildScanUri}", 'https://webhooks.gitter.im/e/6ba348eef26407adc22a'].execute()
            }
        }
    }
}

  • ValidateTaskProperties validation class has been removed. Block needs to be removed or updated somehow
tasks.withType(ValidateTaskProperties) { validateTaskProperties ->
    validateTaskProperties.failOnWarning = true
    validateTaskProperties.enableStricterValidation = true
}
  • Update some dependencies from compile to implementation.

abelsromero avatar Oct 03 '21 08:10 abelsromero