apply from: "$rootDir/gradle/publishMaven.gradle" description = "Java port of Stefan Goessner JsonPath." jar { baseName 'json-path' bnd ( 'Implementation-Title': 'json-path', 'Implementation-Version': version, 'Import-Package': 'org.json.*;resolution:=optional, com.google.gson.*;resolution:=optional, com.fasterxml.jackson.*;resolution:=optional, org.apache.tapestry5.json.*;resolution:=optional, org.codehaus.jettison.*;resolution:=optional, jakarta.json.*;resolution:=optional, *', 'Export-Package': 'com.jayway.jsonpath,com.jayway.jsonpath.spi,com.jayway.jsonpath.spi.cache,com.jayway.jsonpath.spi.json,com.jayway.jsonpath.spi.mapper' ) } dependencies { compile libs.jsonSmart compile libs.slf4jApi compile libs.jacksonDatabind, optional compile libs.gson, optional compile libs.jsonOrg, optional compile libs.tapestryJson, optional compile libs.jettison, optional compile libs.jakartaJsonP, optional compile libs.jakartaJsonB, optional testCompile libs.test } task distZip(type: Zip, dependsOn: assemble) { classifier = 'with-dependencies' from('build/docs') { into 'api' } from(sourcesJar) { into 'source' } from(jar) { into 'lib' } from(project.configurations.compile) { into 'lib' exclude { it.file.name.contains('gson') || it.file.name.contains('jackson') || it.file.name.contains('json-2') || it.file.name.contains('jettison') || it.file.name.contains('tapestry') || it.file.name.contains('jakarta.json') } } from(project.configurations.compile) { into 'lib-optional/jackson' include { it.file.name.contains('jackson') } } from(project.configurations.compile) { into 'lib-optional/gson' include { it.file.name.contains('gson') } } from(project.configurations.compile) { into 'lib-optional/jettison' include { it.file.name.contains('jettison') } } from(project.configurations.compile) { into 'lib-optional/jsonOrg' include { it.file.name.contains('json-2') } } from(project.configurations.compile) { into 'lib-optional/tapestry' include { it.file.name.contains('tapestry') } } from(project.configurations.compile) { into 'lib-optional/jakartaJson' include { it.file.name.contains('jakarta.json') } } } task distTar(type: Tar, dependsOn: assemble) { classifier = 'with-dependencies' compression = Compression.GZIP extension = 'tar.gz' from('build/docs') { into 'api' } from(sourcesJar) { into 'source' } from(jar) { into 'lib' } from(project.configurations.compile) { into 'lib' exclude { it.file.name.contains('gson') || it.file.name.contains('jackson') || it.file.name.contains('json-2') || it.file.name.contains('jettison') || it.file.name.contains('tapestry') || it.file.name.contains('jakarta.json') } } from(project.configurations.compile) { into 'lib-optional/jackson' include { it.file.name.contains('jackson') } } from(project.configurations.compile) { into 'lib-optional/gson' include { it.file.name.contains('gson') } } from(project.configurations.compile) { into 'lib-optional/jettison' include { it.file.name.contains('jettison') } } from(project.configurations.compile) { into 'lib-optional/jsonOrg' include { it.file.name.contains('json-2') } } from(project.configurations.compile) { into 'lib-optional/tapestry' include { it.file.name.contains('tapestry') } } from(project.configurations.compile) { into 'lib-optional/jakartaJson' include { it.file.name.contains('jakarta.json') } } } task dist(){ } dist.dependsOn distZip dist.dependsOn distTar