Skip to content

Commit 4db4f22

Browse files
nRoAlexander Grün
authored andcommitted
add list operators, code refactoring
1 parent 560865f commit 4db4f22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1021
-725
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"apiDocTemplate":"#if (${namingPolicy}=='byDoc')\n$H1 ${methodDescription}\n#else\n$H1 $!{methodName}\n\n$H3 Method description\n\n```\n$!{methodDescription}\n```\n#end\n\n> URL: $!{url}\n>\n> Origin Url: $!{originUrl}\n>\n> Type: $!{methodType}\n\n\n$H3 Request headers\n\n|Header Name| Header Value|\n|---------|------|\n#foreach( $h in ${headerList})\n|$h.type|$h.value|\n#end\n\n$H3 Parameters\n\n$H5 Path parameters\n\n| Parameter | Type | Value | Description |\n|---------|------|------|------------|\n#foreach( $node in ${pathKeyValueList})\n|$node.key|$!{node.type}|$!{node.value}|$!{node.comment}|\n#end\n\n\n$H5 URL parameters\n\n|Required| Parameter | Type | Value | Description |\n|---------|---------|------|------|------------|\n#foreach( $node in ${urlParamsKeyValueList})\n|$!{node.enabled}|$!{node.key}|$!{node.type}|$!{node.value}|$!{node.comment}|\n#end\n\n\n$H5 Body parameters\n\n$H6 JSON\n\n```\n${jsonParam}\n```\n\n$H6 JSON document\n\n```\n${jsonParamDocument}\n```\n\n\n$H5 Form URL-Encoded\n|Required| Parameter | Type | Value | Description |\n|---------|---------|------|------|------------|\n#foreach( $node in ${urlEncodedKeyValueList})\n|$!{node.enabled}|$!{node.key}|$!{node.type}|$!{node.value}|$!{node.comment}|\n#end\n\n\n$H5 Multipart\n|Required | Parameter | Type | Value | Description |\n|---------|---------|------|------|------------|\n#foreach( $node in ${multipartKeyValueList})\n|$!{node.enabled}|$!{node.key}|$!{node.type}|$!{node.value}|$!{node.comment}|\n#end\n\n\n$H3 Response\n\n$H5 Response example\n\n```\n$!{responseExample}\n```\n\n$H5 Response document\n```\n$!{returnDocument}\n```\n\n\n",
3+
"apifoxSetting":{
4+
"domain":"https://api.apifox.com",
5+
"syncAfterSave":false
6+
},
7+
"dataList":[],
8+
"envList":[],
9+
"headerList":[],
10+
"ignoreParseFieldList":[],
11+
"maxDescriptionLength":-1,
12+
"pmCollectionId":"",
13+
"postScript":"",
14+
"preScript":"",
15+
"projectList":[],
16+
"syncModel":{
17+
"branch":"master",
18+
"domain":"https://github.com",
19+
"enabled":false,
20+
"gitToken":"",
21+
"namingPolicy":"byDoc",
22+
"owner":"",
23+
"repo":"",
24+
"repoUrl":"",
25+
"syncAfterRun":false,
26+
"type":"github"
27+
},
28+
"syncPmAfterSave":false,
29+
"urlEncodedKeyValueList":[],
30+
"urlParamsKeyValueList":[],
31+
"urlSuffix":"",
32+
"workspaceId":""
33+
}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,7 @@ hs_err_pid*
8888

8989
target
9090
.idea
91-
querycompiler.iml
91+
querycompiler.iml
92+
93+
build
94+
.gradle

.travis.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.woodpecker.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
labels:
2+
platform: linux/amd64
3+
4+
steps:
5+
- name: build
6+
image: gradle:8.10-jdk21
7+
commands:
8+
- gradle build
9+
10+
- name: publish-core-client
11+
image: gradle:8.10-jdk21
12+
commands:
13+
- gradle publish
14+
environment:
15+
VERSION: ${CI_COMMIT_TAG##v}
16+
NEXUS_USERNAME:
17+
from_secret: nexus_username
18+
NEXUS_PASSWORD:
19+
from_secret: nexus_password
20+
when:
21+
event: tag
22+

build.gradle.kts

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
plugins {
2+
java
3+
antlr
4+
id("maven-publish")
5+
}
6+
7+
group = "de.alexgruen"
8+
version = System.getenv("VERSION") ?: "0.0.1-SNAPSHOT"
9+
description = "Simple QueryCompiler for Java"
10+
11+
java {
12+
sourceCompatibility = JavaVersion.VERSION_21
13+
targetCompatibility = JavaVersion.VERSION_21
14+
}
15+
16+
repositories {
17+
mavenCentral()
18+
}
19+
20+
dependencies {
21+
antlr("org.antlr:antlr4:4.13.2")
22+
implementation("org.antlr:antlr4-runtime:4.13.2")
23+
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.4")
24+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.4")
25+
}
26+
27+
tasks.withType<JavaCompile> {
28+
options.encoding = "UTF-8"
29+
}
30+
31+
tasks.test {
32+
useJUnitPlatform()
33+
}
34+
35+
36+
tasks.generateGrammarSource {
37+
maxHeapSize = "64m"
38+
arguments = arguments + listOf("-visitor", "-long-messages")
39+
}
40+
41+
publishing {
42+
publications {
43+
create<MavenPublication>("maven") {
44+
groupId = project.group.toString()
45+
artifactId = "query-compiler"
46+
version = project.version.toString()
47+
48+
from(components["java"])
49+
}
50+
}
51+
repositories {
52+
maven {
53+
credentials {
54+
username = System.getenv("NEXUS_USERNAME")
55+
password = System.getenv("NEXUS_PASSWORD")
56+
}
57+
58+
val releasesRepoUrl = "https://nexus.gruen.dev/repository/compmuc-maven/"
59+
val snapshotsRepoUrl = "https://nexus.gruen.dev/repository/compmuc-maven/"
60+
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
61+
}
62+
}
63+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)