3

I split my build in 2 files. build.gradle.kts documentation.gradle.kts and I d'like to include the documentation.gradle.kts in my main buildscript.

So I could share it with other projects. But I am getting an error about asciidoctorj not found.

What am I missing?


build.gradle.kts

apply(from = "./gradle-plugins/documentation.gradle.kts")

documentation.gradle.kts

import com.github.jrubygradle.JRubyPlugin
import org.asciidoctor.gradle.AsciidoctorPlugin
import org.asciidoctor.gradle.AsciidoctorTask

buildscript {
    repositories {
         maven { url = uri("https://nexus/repository/public") }
         maven { url = uri("https://nexus/repository/public-plugins") }
    }
    dependencies {
        classpath("com.github.jruby-gradle:jruby-gradle-plugin:1.4.0")
        classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.9.2")
    }
}

apply<JRubyPlugin>()
apply<AsciidoctorPlugin>()

asciidoctorj {
    version = "1.5.4"
}

Error

Script compilation error:

  Line 19: asciidoctorj {
           ^ Unresolved reference: asciidoctorj

1 error

1 Answer 1

4

Since you're not using the plugins block, you'll have to do

configure<AsciidoctorExtension> {

}

instead of

asciidoctor {

}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.