Skip to content

Commit 158344f

Browse files
committed
[expr] Add maven publish.
1 parent 6ccebb7 commit 158344f

File tree

12 files changed

+206
-3
lines changed

12 files changed

+206
-3
lines changed

.idea/checkstyle-idea.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

annotations/build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
plugins {
1818
id 'java-conventions'
1919
id 'java-library'
20+
id 'com.gorylenko.gradle-git-properties' version "${gradleGitPropertiesVersion}"
21+
id 'maven-publish'
22+
}
23+
24+
gitProperties {
25+
keys = gradle.gitPropertiesKeys
2026
}
2127

2228
dependencies {
@@ -25,3 +31,24 @@ dependencies {
2531
implementation group: 'com.squareup', name: 'javapoet', version: 'javapoet'.v()
2632
implementation group: 'org.apache.commons', name: 'commons-lang3', version: 'commons-lang3'.v()
2733
}
34+
35+
publishing {
36+
publications {
37+
annotations(MavenPublication) {
38+
artifactId = 'dingo-expr-annotations'
39+
from components.java
40+
pom {
41+
name = 'dingo-expr-annotations'
42+
description = 'Annotation processors for Dingo Expression.'
43+
}
44+
gradle.setPom(it)
45+
}
46+
}
47+
repositories {
48+
gradle.setOssrhRepo(it, project)
49+
}
50+
}
51+
52+
signing {
53+
sign publishing.publications.annotations
54+
}

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
*/
1616

1717
group GROUP
18+
version VERSION
1819

1920
subprojects {
2021
group GROUP
22+
version VERSION
2123
}

buildSrc/src/main/groovy/java-conventions.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@
1717
plugins {
1818
id 'java'
1919
id 'checkstyle'
20+
id 'signing'
2021
}
2122

2223
java {
2324
toolchain {
2425
languageVersion.set(JavaLanguageVersion.of(8))
2526
}
27+
withSourcesJar()
28+
withJavadocJar()
2629
}
2730

2831
checkstyle {

coding/build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,35 @@
1717
plugins {
1818
id 'java-conventions'
1919
id 'java-library'
20+
id 'com.gorylenko.gradle-git-properties' version "${gradleGitPropertiesVersion}"
21+
id 'maven-publish'
22+
}
23+
24+
gitProperties {
25+
keys = gradle.gitPropertiesKeys
2026
}
2127

2228
dependencies {
2329
api project(':dingo-expr-runtime')
2430
}
31+
32+
publishing {
33+
publications {
34+
coding(MavenPublication) {
35+
artifactId = 'dingo-expr-coding'
36+
from components.java
37+
pom {
38+
name = 'dingo-expr-coding'
39+
description = 'Coding library of Dingo Expression.'
40+
}
41+
gradle.setPom(it)
42+
}
43+
}
44+
repositories {
45+
gradle.setOssrhRepo(it, project)
46+
}
47+
}
48+
49+
signing {
50+
sign publishing.publications.coding
51+
}

gradle.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,12 @@ logback.version=1.2.3
6161
# To be same as in Calcite
6262
checkerframework.version=3.12.0
6363
checkstyle.version=8.30
64+
65+
gradleGitPropertiesVersion=2.4.1
66+
67+
#
68+
# For release script. These are not the real credentials.
69+
# You should set env `MAVEN_USERNAME` & `MAVEN_TOKEN` and run `gradle publish`.
70+
#
71+
ossrhUsername=dingodb
72+
ossrhPassword=xxxxxxxx

json/build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
plugins {
1818
id 'java-conventions'
1919
id 'java-library'
20+
id 'com.gorylenko.gradle-git-properties' version "${gradleGitPropertiesVersion}"
21+
id 'maven-publish'
22+
}
23+
24+
gitProperties {
25+
keys = gradle.gitPropertiesKeys
2026
}
2127

2228
dependencies {
@@ -26,3 +32,24 @@ dependencies {
2632
implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-afterburner', version: 'jackson'.v()
2733
implementation project(':dingo-expr-runtime')
2834
}
35+
36+
publishing {
37+
publications {
38+
json(MavenPublication) {
39+
artifactId = 'dingo-expr-json'
40+
from components.java
41+
pom {
42+
name = 'dingo-expr-json'
43+
description = 'Json library of Dingo Expression.'
44+
}
45+
gradle.setPom(it)
46+
}
47+
}
48+
repositories {
49+
gradle.setOssrhRepo(it, project)
50+
}
51+
}
52+
53+
signing {
54+
sign publishing.publications.json
55+
}

json/src/main/java/io/dingodb/expr/json/runtime/DataParser.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ private DataParser(DataFormat format, SchemaRoot schemaRoot) {
6969
/**
7070
* Create a {@link DataParser} of json format.
7171
*
72+
* @param schemaRoot the {@link SchemaRoot}
7273
* @return a {@link DataParser}
7374
*/
7475
public static @NonNull DataParser json(SchemaRoot schemaRoot) {
@@ -78,6 +79,7 @@ private DataParser(DataFormat format, SchemaRoot schemaRoot) {
7879
/**
7980
* Create a {@link DataParser} of yaml format.
8081
*
82+
* @param schemaRoot the {@link SchemaRoot}
8183
* @return a {@link DataParser}
8284
*/
8385
public static @NonNull DataParser yaml(SchemaRoot schemaRoot) {
@@ -87,7 +89,8 @@ private DataParser(DataFormat format, SchemaRoot schemaRoot) {
8789
/**
8890
* Create a {@link DataParser} of a specified format.
8991
*
90-
* @param format the {@link DataFormat}
92+
* @param format the {@link DataFormat}
93+
* @param schemaRoot the {@link SchemaRoot}
9194
* @return a {@link DataParser}
9295
*/
9396
public static @NonNull DataParser get(DataFormat format, SchemaRoot schemaRoot) {

libexpr

Submodule libexpr updated 1 file

parser/build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ plugins {
1818
id 'antlr'
1919
id 'java-conventions'
2020
id 'java-library'
21+
id 'com.gorylenko.gradle-git-properties' version "${gradleGitPropertiesVersion}"
22+
id 'maven-publish'
23+
}
24+
25+
gitProperties {
26+
keys = gradle.gitPropertiesKeys
2127
}
2228

2329
dependencies {
@@ -38,3 +44,24 @@ tasks.withType(Checkstyle).configureEach {
3844
exclude '**/DingoExprParserBaseVisitor.java'
3945
exclude '**/DingoExprParserVisitor.java'
4046
}
47+
48+
publishing {
49+
publications {
50+
parser(MavenPublication) {
51+
artifactId = 'dingo-expr-parser'
52+
from components.java
53+
pom {
54+
name = 'dingo-expr-parser'
55+
description = 'Literal parser of Dingo Expression.'
56+
}
57+
gradle.setPom(it)
58+
}
59+
}
60+
repositories {
61+
gradle.setOssrhRepo(it, project)
62+
}
63+
}
64+
65+
signing {
66+
sign publishing.publications.parser
67+
}

0 commit comments

Comments
 (0)