apply from: "$rootDir/gradle/publishMaven.gradle" displayName = "Json Path" description = "Java port of Stefan Goessner JsonPath." jar { baseName 'json-path' manifest { attributes 'Implementation-Title': 'json-path', 'Implementation-Version': version instruction 'Import-Package', 'org.json.*;resolution:=optional', 'com.google.gson.*;resolution:=optional', 'com.fasterxml.jackson.*;resolution:=optional', 'net.minidev.json.*;resolution:=optional', '*' } } dependencies { compile libs.jsonSmart compile libs.slf4jApi compile libs.jacksonDatabind, optional compile libs.gson, optional compile libs.jsonOrg, optional compile libs.tapestryJson, 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') } } 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/jsonOrg' include { it.file.name.contains('json-2') } } from(project.configurations.compile) { into 'lib-optional/jsonOrg' include { it.file.name.contains('tapestry') } } } 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')} } 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/jsonOrg' include { it.file.name.contains('json-2') } } from(project.configurations.compile) { into 'lib-optional/jsonOrg' include { it.file.name.contains('tapestry') } } } task dist(){ } dist.dependsOn distZip dist.dependsOn distTar