Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
insert_final_newline = true
end_of_line = lf

[*.{kt,kts}]
indent_style = space
indent_size = 2
max_line_length = 100
48 changes: 29 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
# Compiled class file
*.class
.gradle
.kotlin
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

# Log file
*.log
### IntelliJ IDEA ###
.idea

# BlueJ files
*.ctxt
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

# Mobile Tools for Java (J2ME)
.mtj.tmp/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
### VS Code ###
.vscode/

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
### Mac OS ###
.DS_Store
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "jsonpath-compliance-test-suite"]
path = src/test/resources/compliance-test-suite
url = git@github.com:jsonpath-standard/jsonpath-compliance-test-suite.git
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# vertx-json-path
# Vert.x JSON Path

A complete implementation of the JSON Path Standard (RFC 9535) for use with Vert.x
137 changes: 137 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
import org.jetbrains.dokka.gradle.DokkaTask

plugins {
kotlin("jvm") version "2.0.0"

`java-library`
`maven-publish`

id("org.jetbrains.kotlinx.kover")
id("org.sonarqube") version "3.5.0.2730"

id("org.jetbrains.dokka") version "1.9.20"

id("org.jlleitschuh.gradle.ktlint")
}

group = "com.kobil.vertx"
version = "1.0.0-SNAPSHOT"

repositories {
mavenCentral()
}

val arrowVersion: String by project
val caffeineVersion: String by project
val kotlinCoroutinesVersion: String by project
val vertxVersion: String by project

val junitJupiterVersion: String by project
val kotestVersion: String by project
val kotestArrowVersion: String by project

dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion")

implementation(platform("io.arrow-kt:arrow-stack:$arrowVersion"))
implementation("io.arrow-kt:arrow-core")

implementation("com.github.ben-manes.caffeine:caffeine:$caffeineVersion")

implementation(platform("io.vertx:vertx-stack-depchain:$vertxVersion"))
implementation("io.vertx:vertx-core")
implementation("io.vertx:vertx-lang-kotlin")
implementation("io.vertx:vertx-lang-kotlin-coroutines")

testImplementation(platform("io.kotest:kotest-bom:$kotestVersion"))
testImplementation("io.kotest:kotest-runner-junit5")
testImplementation("io.kotest:kotest-assertions-core")
testImplementation("io.kotest:kotest-property")
testImplementation("io.kotest.extensions:kotest-assertions-arrow:$kotestArrowVersion")

testImplementation("org.junit.jupiter:junit-jupiter:$junitJupiterVersion")
}

tasks.test {
useJUnitPlatform()

finalizedBy(tasks.koverHtmlReport, tasks.koverXmlReport)
}

kotlin {
jvmToolchain(17)

compilerOptions {
allWarningsAsErrors.set(true)
}
}

java {
withSourcesJar()
}

ktlint {
version.set("1.3.1")
}

kover {
reports {
filters {
excludes {
classes("com.kobil.vertx.jsonpath.Build", "com.kobil.vertx.jsonpath.Compile")
}
}
}
}

tasks.withType<DokkaTask>().configureEach {
suppressObviousFunctions.set(true)
failOnWarning.set(true)

dokkaSourceSets.configureEach {
reportUndocumented.set(true)
}
}

val dokkaJavadocJar: Jar by tasks.creating(Jar::class) {
group = "documentation"

dependsOn(tasks.dokkaJavadoc)
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
archiveClassifier.set("javadoc")
}

tasks.assemble.configure {
dependsOn(dokkaJavadocJar)
}

val documentationElements: Configuration by configurations.creating {
outgoing {
artifact(dokkaJavadocJar) {
type = "jar"
classifier = "javadoc"
builtBy(dokkaJavadocJar)
}
}

attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category::class, Category.DOCUMENTATION))
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling::class, Bundling.EXTERNAL))
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType::class, DocsType.JAVADOC))
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class, Usage.JAVA_RUNTIME))
}
}

components.getByName<AdhocComponentWithVariants>("java") {
addVariantsFromConfiguration(documentationElements) {}
}

publishing {
publications {
create<MavenPublication>("vertx-json-path") {
artifactId = "vertx-json-path"
from(components["java"])
}
}
}
19 changes: 19 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
kotlin.code.style=official

# Dependencies
arrowVersion=1.2.4
caffeineVersion=3.1.8
kotlinCoroutinesVersion=1.8.1
vertxVersion=4.5.9

# Test Dependencies
junitJupiterVersion=5.11.2

kotestVersion=5.9.1
kotestArrowVersion=1.4.0

# Tools
koverVersion=0.8.3

ktlintVersion=1.3.1
ktlintGradleVersion=12.1.0
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Mon Aug 19 14:04:19 CEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading