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

group = 'org.dita-ot.pdf'

description = """DITA Open Toolkit PDF plug-in."""

repositories {
    mavenCentral()
}
dependencies {
    implementation rootProject
    implementation group: 'commons-io', name: 'commons-io', version: '2.19.0'
    implementation group: 'com.ibm.icu', name: 'icu4j', version: '77.1'
    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'
    implementation group: 'xml-resolver', name: 'xml-resolver', version:'1.2'
}
sourceSets {
    main {
        java {
            srcDir 'src'
        }
    }
}

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

jar.archiveFileName = "${project.name}.jar"
jar.include "com/idiominc/**"
jar.include "com/suite/**"
jar.include "org/dita/dost/pdf2/**"

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

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