jar {
    classifier = 'universal'
    manifest {
        attributes FMLCorePlugin: "li.cil.oc.common.launch.TransformerLoader"
        attributes FMLCorePluginContainsFMLMod: "true"
    }
}

javadoc {
    include 'li/cil/oc/api/**'
}

// because the normal default jar task has been modified to be obfuscated
task deobfJar(type: Jar) {
    from sourceSets.main.output
    classifier = 'deobf'
    manifest {
        attributes FMLCorePlugin: "li.cil.oc.common.launch.TransformerLoader"
        attributes FMLCorePluginContainsFMLMod: "true"
    }
}

task apiJar(type: Jar) {
    from sourceSets.main.output
    from sourceSets.main.java
    classifier = 'api'
    include 'li/cil/oc/api/**'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
    from 'build/docs/javadoc'
    classifier 'javadoc'
}

artifacts {
    archives deobfJar
    archives apiJar
    archives javadocJar
}
