diff --git a/jvm/src/main/groovy/org/asciidoctor/gradle/jvm/AbstractAsciidoctorTask.groovy b/jvm/src/main/groovy/org/asciidoctor/gradle/jvm/AbstractAsciidoctorTask.groovy index 2d7c3c387..ebd83ed64 100644 --- a/jvm/src/main/groovy/org/asciidoctor/gradle/jvm/AbstractAsciidoctorTask.groovy +++ b/jvm/src/main/groovy/org/asciidoctor/gradle/jvm/AbstractAsciidoctorTask.groovy @@ -93,7 +93,7 @@ class AbstractAsciidoctorTask extends AbstractJvmModelExecTask asciidocConfigurations = [] @@ -222,7 +222,7 @@ class AbstractAsciidoctorTask extends AbstractJvmModelExecTask getOptions() { - resolveAsCacheable(asciidoctorj.options, projectOperations) + resolveAsCacheable(asciidoctorjDEPRECATED.options, projectOperations) } /** Apply a new set of Asciidoctor options, clearing any options previously set. @@ -234,7 +234,7 @@ class AbstractAsciidoctorTask extends AbstractJvmModelExecTask getAttributes() { - resolveAsCacheable(asciidoctorj.attributes, projectOperations) + resolveAsCacheable(asciidoctorjDEPRECATED.attributes, projectOperations) } /** Apply a new set of Asciidoctor options, clearing any options previously set. @@ -268,7 +268,7 @@ class AbstractAsciidoctorTask extends AbstractJvmModelExecTask getAttributeProviders() { - asciidoctorj.attributeProviders + asciidoctorjDEPRECATED.attributeProviders } /** Returns all of the specified configurations as a collections of files. @@ -305,7 +305,7 @@ class AbstractAsciidoctorTask extends AbstractJvmModelExecTask seed + projectOperations.configurations.asConfiguration(it) } @@ -348,7 +348,7 @@ class AbstractAsciidoctorTask extends AbstractJvmModelExecTask getReportableConfigurations() { - ([asciidoctorj.configuration] + projectOperations.configurations.asConfigurations(asciidocConfigurations)) + ([asciidoctorjDEPRECATED.configuration] + projectOperations.configurations.asConfigurations(asciidocConfigurations)) .toSet() } @@ -467,7 +467,7 @@ class AbstractAsciidoctorTask extends AbstractJvmModelExecTask, Configuration> - inputs.files(this.asciidoctorj.configuration) + inputs.files(this.asciidoctorjDEPRECATED.configuration) inputs.files { gemJarProviders }.withPathSensitivity(RELATIVE) inputs.property 'backends', { -> backends() } - inputs.property 'asciidoctorj-version', { -> asciidoctorj.version } - inputs.property 'jruby-version', { -> asciidoctorj.jrubyVersion ?: '' } + inputs.property 'asciidoctorj-version', { -> asciidoctorjDEPRECATED.version } + inputs.property 'jruby-version', { -> asciidoctorjDEPRECATED.jrubyVersion ?: '' } execSpec = new AsciidoctorJvmExecSpec(projectOperations) entrypoint { mainClass = AsciidoctorJavaExec.canonicalName @@ -585,13 +585,13 @@ class AbstractAsciidoctorTask extends AbstractJvmModelExecTask getAsciidoctorJExtensions() { - asciidoctorj.docExtensions + asciidoctorjDEPRECATED.docExtensions } @Nested @@ -703,7 +703,7 @@ class AbstractAsciidoctorTask extends AbstractJvmModelExecTask deps = asciidoctorj.docExtensions.findAll { + List deps = asciidoctorjDEPRECATED.docExtensions.findAll { it instanceof Dependency } as List @@ -753,7 +753,7 @@ class AbstractAsciidoctorTask extends AbstractJvmModelExecTask deps) { Configuration cfg = detachedConfigurationCreator.apply(deps) - asciidoctorj.loadJRubyResolutionStrategy(cfg) + asciidoctorjDEPRECATED.loadJRubyResolutionStrategy(cfg) cfg } @@ -761,7 +761,7 @@ class AbstractAsciidoctorTask extends AbstractJvmModelExecTask, attributeProviders, lang @@ -769,7 +769,7 @@ class AbstractAsciidoctorTask extends AbstractJvmModelExecTask findExtensionClosures() { - asciidoctorj.docExtensions.findAll { + asciidoctorjDEPRECATED.docExtensions.findAll { it instanceof Closure } as List } diff --git a/jvm/src/test/groovy/org/asciidoctor/gradle/jvm/AsciidoctorTaskSpec.groovy b/jvm/src/test/groovy/org/asciidoctor/gradle/jvm/AsciidoctorTaskSpec.groovy index 741733bc4..bb1d5cfec 100755 --- a/jvm/src/test/groovy/org/asciidoctor/gradle/jvm/AsciidoctorTaskSpec.groovy +++ b/jvm/src/test/groovy/org/asciidoctor/gradle/jvm/AsciidoctorTaskSpec.groovy @@ -336,16 +336,16 @@ class AsciidoctorTaskSpec extends Specification { } } final task = createTask { - asciidoctorj { + asciidoctorjDEPRECATED { requires 'slim', 'tilt' } } then: !systemOut.toString().contains('deprecated') - task.asciidoctorj.requires[0] == 'asciidoctor-pdf' - task.asciidoctorj.requires[1] == 'slim' - task.asciidoctorj.requires[2] == 'tilt' + task.asciidoctorjDEPRECATED.requires[0] == 'asciidoctor-pdf' + task.asciidoctorjDEPRECATED.requires[1] == 'slim' + task.asciidoctorjDEPRECATED.requires[2] == 'tilt' } void "Allow setting of requires via assignment"() { @@ -356,16 +356,16 @@ class AsciidoctorTaskSpec extends Specification { } } final task = createTask { - asciidoctorj { + asciidoctorjDEPRECATED { requires = ['slim', 'tilt'] } } then: !systemOut.toString().contains('deprecated') - !task.asciidoctorj.requires.contains('asciidoctor-pdf') - task.asciidoctorj.requires.contains('tilt') - task.asciidoctorj.requires.contains('slim') + !task.asciidoctorjDEPRECATED.requires.contains('asciidoctor-pdf') + task.asciidoctorjDEPRECATED.requires.contains('tilt') + task.asciidoctorjDEPRECATED.requires.contains('slim') } void "Allow setting of sourceDir via method"() { @@ -406,7 +406,7 @@ class AsciidoctorTaskSpec extends Specification { void 'When attribute providers are registered on the task, then global ones will not be used.'() { when: final task = createTask { - asciidoctorj { + asciidoctorjDEPRECATED { attributeProvider { [:] }