We use this plugin to convert .adoc files into HTML files that we use to distribute as documentation and we try not to create unnecessary Gradle tasks until it is needed. Hence for any changes that we make to our Gradle build, we run a Gradle build scan to try and avoid task creation. See Gradle's avoidance page.
To keep things as simple as possible I created an empty Gradle project and modified the build.gradle.kts file to look as follows:
import org.asciidoctor.gradle.jvm.AsciidoctorTask
plugins {
id("org.asciidoctor.editorconfig") version "3.3.2"
id("org.asciidoctor.jvm.convert") version "3.3.2"
}
group = "org.example"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
val asciidoctorTaskName = "asciidoctor"
tasks.named<AsciidoctorTask>(asciidoctorTaskName).configure {
sourceDir(rootDir)
setOutputDir("build/docs")
sources {
include("*.adoc")
}
}
Running a build scan via the command line .\gradlew.bat help --scan I can see that the task "asciidoctorEditorConfig" gets created immediately. If it is a multi level project this gets created per subproject.
Had a look and it seems to be in the AsciidoctorEditorConfigPlugin class where the task is created every time:
We use this plugin to convert .adoc files into HTML files that we use to distribute as documentation and we try not to create unnecessary Gradle tasks until it is needed. Hence for any changes that we make to our Gradle build, we run a Gradle build scan to try and avoid task creation. See Gradle's avoidance page.
To keep things as simple as possible I created an empty Gradle project and modified the build.gradle.kts file to look as follows:
Running a build scan via the command line
.\gradlew.bat help --scan
I can see that the task "asciidoctorEditorConfig" gets created immediately. If it is a multi level project this gets created per subproject.Had a look and it seems to be in the
AsciidoctorEditorConfigPlugin
class where the task is created every time:Is there any future plans to make the plugin task avoidance compliant?