forked from neowu/core-ng-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
137 lines (125 loc) · 4.72 KB
/
build.gradle.kts
File metadata and controls
137 lines (125 loc) · 4.72 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
plugins {
`java-library`
`maven-publish`
project
}
subprojects {
group = "core.framework"
version = "9.3.1"
repositories {
maven {
url = uri("https://neowu.github.io/maven-repo/")
content {
includeGroup("core.framework.elasticsearch.module")
}
}
}
}
val elasticVersion = "8.18.1"
val jacksonVersion = "2.20.1"
val junitVersion = "6.0.0"
val mockitoVersion = "5.20.0"
val assertjVersion = "3.27.6"
project("core-ng-api") {
apply(plugin = "lib")
dependencies {
api("org.jspecify:jspecify:1.0.0")
}
}
project("core-ng") {
apply(plugin = "lib")
dependencies {
api(project(":core-ng-api"))
api("org.slf4j:slf4j-api:2.0.17")
implementation("org.javassist:javassist:3.30.2-GA")
implementation("com.fasterxml.jackson.module:jackson-module-afterburner:${jacksonVersion}")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonVersion}")
implementation("com.squareup.okhttp3:okhttp:5.3.2")
implementation("io.undertow:undertow-core:2.3.20.Final")
implementation("org.apache.kafka:kafka-clients:4.1.1") {
exclude("org.xerial.snappy")
exclude("org.lz4")
}
compileOnly("org.jboss.logging:jboss-logging-annotations:2.2.1.Final")
compileOnly("com.github.spotbugs:spotbugs-annotations:4.9.8")
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testImplementation("org.mockito:mockito-junit-jupiter:${mockitoVersion}")
testImplementation("org.assertj:assertj-core:${assertjVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.hsqldb:hsqldb:2.7.4")
}
}
project("core-ng-test") {
apply(plugin = "lib")
dependencies {
api("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
api("org.mockito:mockito-junit-jupiter:${mockitoVersion}")
api("org.assertj:assertj-core:${assertjVersion}")
implementation(project(":core-ng"))
implementation("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
implementation("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.hsqldb:hsqldb:2.7.4")
}
}
project("core-ng-mongo") {
apply(plugin = "lib")
dependencies {
api(project(":core-ng"))
api("org.mongodb:mongodb-driver-sync:5.5.1")
testImplementation(project(":core-ng-test"))
}
}
project("core-ng-mongo-test") {
apply(plugin = "lib")
dependencies {
implementation(project(":core-ng-test"))
implementation(project(":core-ng-mongo"))
implementation("de.bwaldvogel:mongo-java-server:1.47.0")
}
}
project("core-ng-search") {
apply(plugin = "lib")
dependencies {
api(project(":core-ng"))
api("co.elastic.clients:elasticsearch-java:${elasticVersion}") {
exclude(group = "io.opentelemetry")
}
implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}")
testImplementation(project(":core-ng-test"))
}
}
project("core-ng-search-test") {
apply(plugin = "lib")
dependencies {
implementation(project(":core-ng-test"))
implementation(project(":core-ng-search"))
implementation("org.elasticsearch:elasticsearch:${elasticVersion}") {
exclude(group = "io.opentelemetry")
}
implementation("org.elasticsearch.plugin:transport-netty4:${elasticVersion}")
implementation("core.framework.elasticsearch.module:mapper-extras:${elasticVersion}") // used by elasticsearch scaled_float
implementation("core.framework.elasticsearch.module:lang-painless:${elasticVersion}")
implementation("core.framework.elasticsearch.module:analysis-common:${elasticVersion}") // used by elasticsearch stemmer
implementation("core.framework.elasticsearch.module:reindex:${elasticVersion}") // used by elasticsearch deleteByQuery
runtimeOnly("org.apache.logging.log4j:log4j-to-slf4j:2.19.0")
}
}
val mavenURL = project.properties["mavenURL"] as String? // usage: "gradlew -PmavenURL=/path clean publish"
subprojects {
if (mavenURL != null && project.name.startsWith("core-ng")) {
apply(plugin = "maven-publish")
val mavenDir = file(mavenURL)
assert(mavenDir.exists())
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
repositories {
maven { url = uri(mavenURL) }
}
}
}
}