plugins {
    id "maven-publish"
    id "java-gradle-plugin"
    id "com.gradle.plugin-publish"
    id "groovy"
}

description = "Collection of Apache Commons Compress related Gradle plugins"

gradlePlugin {
    plugins {
        compress {
            id = "io.freefair.compress"
            implementationClass = "io.freefair.gradle.plugins.compress.CompressPlugin"
            displayName = "commons-compress Plugin"
            description = "Allows reading and writing archive formats supported by commons-compress"
            tags.set(['commons-compress'])
        }
        sevenZip {
            id = "io.freefair.compress.7z"
            implementationClass = "io.freefair.gradle.plugins.compress.SevenZipPlugin"
            displayName = "7zip Plugin"
            description = "7zip Plugin"
            tags.set(['commons-compress'])
        }
        ar {
            id = "io.freefair.compress.ar"
            implementationClass = "io.freefair.gradle.plugins.compress.ArPlugin"
            displayName = "ar Plugin"
            description = "ar Plugin"
            tags.set(['commons-compress'])
        }
        cpio {
            id = "io.freefair.compress.cpio"
            implementationClass = "io.freefair.gradle.plugins.compress.CpioPlugin"
            displayName = "cpio Plugin"
            description = "cpio Plugin"
            tags.set(['commons-compress'])
        }
        trees {
            id = "io.freefair.compress.trees"
            implementationClass = "io.freefair.gradle.plugins.compress.CompressTreePlugin"
            displayName = "commons-compress fileTree Plugin"
            description = "Allows to open formats supported by commons-compress as FileTree"
            tags.set(['commons-compress'])
        }
    }
}

dependencies {
    api 'org.apache.commons:commons-compress:1.28.0'
    implementation 'org.tukaani:xz:1.10'

    implementation 'org.brotli:dec:0.1.2'

    testImplementation project(":test-common")
    testImplementation platform("org.spockframework:spock-bom:2.3-groovy-4.0")
    testImplementation 'org.spockframework:spock-core'
    testImplementation 'org.spockframework:spock-junit4'
    testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
}
