/*
 * This file is part of the DITA Open Toolkit project.
 *
 * Copyright 2017 Jarno Elovirta
 *
 *  See the accompanying LICENSE file for applicable license.
 */
plugins {
    id "java"
    id "maven-publish"
}

group = 'org.dita-ot.htmlhelp'

description = """DITA Open Toolkit HTML Help plug-in."""

repositories {
    mavenCentral()
}
dependencies {
    implementation rootProject
    implementation group: 'commons-io', name: 'commons-io', version: '2.19.0'
    implementation group: 'net.sf.saxon', name: 'Saxon-HE', version: '12.7'
    implementation group: 'org.apache.ant', name: 'ant', version:'1.10.15'
    implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.17'
    testImplementation rootProject
    testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.10.2'
    testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.10.2'
    testImplementation group: 'org.xmlunit', name: 'xmlunit-core', version: '2.10.2'
    testImplementation group: 'nu.validator', name: 'htmlparser', version:'1.4.16'
    testImplementation rootProject.sourceSets.test.output
}

tasks.named("test", Test)  {
    useJUnitPlatform()
}

jar.archiveFileName = "${project.name}.jar"

tasks.register('copyInstall', Copy) {
    from(jar)
    destinationDir = file("lib")
}

tasks.register('copyDistTemp', Copy) {
    from(jar) {
        into "plugins/org.dita.htmlhelp/lib"
    }
    destinationDir = file("${rootProject.buildDir}/tmp/dist")
}
