JsonPath仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
3.3 KiB

apply from: "$rootDir/gradle/publishMaven.gradle"
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', 'org.apache.tapestry5.json.*;resolution:=optional', '*'
}
}
dependencies {
compile (libs.jsonSmart){
// see https://github.com/jayway/JsonPath/issues/228, https://github.com/netplex/json-smart-v2/issues/20
exclude group: 'org.ow2.asm', module: 'asm'
}
compile libs.slf4jApi
compile libs.jacksonDatabind, optional
compile libs.gson, optional
compile libs.jsonOrg, optional
compile libs.tapestryJson, optional
compile libs.jettison, 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') }
}
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/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') || it.file.name.contains('jettison') }
}
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/jsonOrg'
include { it.file.name.contains('tapestry') }
}
}
task dist(){
}
dist.dependsOn distZip
dist.dependsOn distTar