forked from bohnman/squiggly
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
108 lines (89 loc) · 3.01 KB
/
build.gradle.kts
File metadata and controls
108 lines (89 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
plugins {
`java-library`
antlr
`maven-publish`
}
group = "co.ipregistry"
version = "2.0.0"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withSourcesJar()
withJavadocJar()
}
repositories {
mavenCentral()
}
dependencies {
antlr("org.antlr:antlr4:4.13.2")
api("tools.jackson.core:jackson-databind:3.1.0")
api("tools.jackson.dataformat:jackson-dataformat-xml:3.1.0")
implementation("org.antlr:antlr4-runtime:4.13.2")
implementation("org.apache.commons:commons-lang3:3.20.0")
implementation("com.google.guava:guava:33.5.0-jre")
implementation("commons-beanutils:commons-beanutils:1.11.0")
implementation("net.jcip:jcip-annotations:1.0")
compileOnly("jakarta.servlet:jakarta.servlet-api:6.1.0")
testImplementation("org.junit.jupiter:junit-jupiter:6.0.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:6.0.3")
}
sourceSets {
main {
antlr {
setSrcDirs(listOf("src/main/antlr4"))
}
java {
srcDir("src/generated/java")
}
}
}
tasks.generateGrammarSource {
arguments = arguments + listOf("-visitor", "-no-listener", "-package", "co.ipregistry.squiggly.parser.antlr4")
outputDirectory = file("src/generated/java")
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
dependsOn(tasks.generateGrammarSource)
}
tasks.test {
useJUnitPlatform()
}
tasks.named<Jar>("sourcesJar") {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = "co.ipregistry"
artifactId = "squiggly-filter-jackson"
from(components["java"])
pom {
name = "Squiggly Filter Jackson"
description = "The Squiggly Filter is a Jackson JSON PropertyFilter, which selects properties of an object/list/map using a subset of the Facebook Graph API filtering syntax."
url = "https://github.com/ipregistry/squiggly"
licenses {
license {
name = "BSD License"
url = "https://raw.githubusercontent.com/ipregistry/squiggly/master/LICENSE.md"
}
}
scm {
connection = "scm:git:git://github.com/ipregistry/squiggly.git"
developerConnection = "scm:git:ssh://github.com:ipregistry/squiggly.git"
url = "https://github.com/ipregistry/squiggly/tree/master"
}
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/ipregistry/squiggly")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GH_PACKAGES_USER")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GH_PACKAGES_WRITE_TOKEN")
}
}
}
}