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.

108 lines
3.2 KiB

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, *'
)
}
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
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') }
}
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') }
}
}
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') }
}
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') }
}
}
task dist(){
}
dist.dependsOn distZip
dist.dependsOn distTar