repositories {
    gradlePluginPortal()
}

generateModuleVersions {
    basename = 'slides2pdf'
    propertyNames ~/^npm.decktape$/, ~/^npm.puppeteer$/, ~/^npm.node-pre-gyp$/
}

configurations {
    additionalPluginClasspath
    gradleTest.extendsFrom additionalPluginClasspath
}

dependencies {
    implementation project(':asciidoctor-gradle-base')
    implementation project(':asciidoctor-gradle-js')
    additionalPluginClasspath project(':asciidoctor-gradle-jvm-slides')
    additionalPluginClasspath project(':asciidoctor-gradle-js')
}

intTest {
    enabled = !gradle.startParameter.isOffline()
    systemProperties TEST_PROJECTS_DIR: file('src/intTest/projects')
}

pluginUnderTestMetadata {
    pluginClasspath.from configurations.additionalPluginClasspath
}

configurePlugin 'org.asciidoctor.decktape.base',
        'Converts HTML slides generated by Asciidoctor to PDF using decktape',
        'Any slide deck generated by supported Asciidoctor slide task types can be converted to PDF',
        ['asciidoctorj', 'asciidoctor.js', 'decktape', 'reveal.js', 'slides', 'pdf', 'jpg', 'png']

configurePlugin 'org.asciidoctor.decktape',
        'Converts HTML slides generated by Asciidoctor to PDF/PNG/JPG using decktape',
        'Adds convenience rules to compliment Asciidoctor slide task types',
        ['asciidoctorj', 'asciidoctor.js', 'decktape', 'reveal.js', 'slides', 'pdf', 'jpg', 'png']

ci {
    gitlabci {
        intTest.systemProperties 'NO_CHROME_SANDBOX' : 1
    }
}
