generated from bridgelightcloud/github-mirror-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
276 lines (241 loc) · 12.2 KB
/
build.gradle
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
/*
* Copyright (c) 2024 Thraax Session <spaceup@iatlas.technology>.
*
* SpaceUp-Server is free software; You can redistribute it and/or modify it under the terms of:
* - the GNU Affero General Public License version 3 as published by the Free Software Foundation.
* You don't have to do anything special to accept the license and you don’t have to notify anyone which that you have made that decision.
*
* SpaceUp-Server is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See your chosen license for more details.
*
* You should have received a copy of both licenses along with SpaceUp-Server
* If not, see <http://www.gnu.org/licenses/>.
*
* There is a strong belief within us that the license we have chosen provides not only the best solution for providing you with the essential freedom necessary to use SpaceUp-Server within your projects, but also for maintaining enough copyleft strength for us to feel confident and secure with releasing our hard work to the public. For your convenience we've included our own interpretation of the license we chose, which can be seen below.
*
* Our interpretation of the GNU Affero General Public License version 3: (Quoted words are words in which there exists a definition within the license to avoid ambiguity.)
* 1. You must always provide the source code, copyright and license information of SpaceUp-Server whenever you "convey" any part of SpaceUp-Server;
* be it a verbatim copy or a modified copy.
* 2. SpaceUp-Server was developed as a library and has therefore been designed without knowledge of your work; as such the following should be implied:
* a) SpaceUp-Server was developed without knowledge of your work; as such the following should be implied:
* i) SpaceUp-Server should not fall under a work which is "based on" your work.
* ii) You should be free to use SpaceUp-Server in a work covered by the:
* - GNU General Public License version 2
* - GNU Lesser General Public License version 2.1
* This is due to those licenses classifying SpaceUp-Server as a work which would fall under an "aggregate" work by their terms and definitions;
* as such it should not be covered by their terms and conditions. The relevant passages start at:
* - Line 129 of the GNU General Public License version 2
* - Line 206 of the GNU Lesser General Public License version 2.1
* b) If you have not "modified", "adapted" or "extended" SpaceUp-Server then your work should not be bound by this license,
* as you are using SpaceUp-Server under the definition of an "aggregate" work.
* c) If you have "modified", "adapted" or "extended" SpaceUp-Server then any of those modifications/extensions/adaptations which you have made
* should indeed be bound by this license, as you are using SpaceUp-Server under the definition of a "based on" work.
*
* Our hopes is that our own interpretation of license aligns perfectly with your own values and goals for using our work freely and securely. If you have any questions at all about the licensing chosen for SpaceUp-Server you can email us directly at spaceup@iatlas.technology or you can get in touch with the license authors (the Free Software Foundation) at licensing@fsf.org to gain their opinion too.
*
* Alternatively you can provide feedback and acquire the support you need at our support forum. We'll definitely try and help you as soon as possible, and to the best of our ability; as we understand that user experience is everything, so we want to make you as happy as possible! So feel free to get in touch via our support forum and chat with other users of SpaceUp-Server here at:
* https://spaceup.iatlas.technology
*
* Thanks, and we hope you enjoy using SpaceUp-Server and that it's everything you ever hoped it could be.
*/
plugins {
id "org.jetbrains.kotlin.jvm" version "${kotlinVersion}"
id "org.jetbrains.kotlin.kapt" version "${kotlinVersion}"
id "org.jetbrains.kotlin.plugin.allopen" version "${kotlinVersion}"
id "com.github.johnrengelman.shadow" version "8.1.1"
id "org.sonarqube" version "4.4.1.3373"
id "nebula.lint" version "18.1.0" // 18.0.0 works only with Gradle 8.x
//id "io.micronaut.aot" version "3.6.5"
id 'io.micronaut.application' version '4.2.1'
id 'project-report'
id "application"
id 'maven-publish'
}
version "0.32.0"
group "technology.iatlas.spaceup"
repositories {
mavenCentral()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
url = uri("https://artifactory.iatlas.dev/releases")
}
}
ext {
uploadUrl = "https://artifactory.iatlas.dev/releases/"
}
// for dependencies that are needed for development only
if(project.hasProperty("gradleEnv") && project.getProperty("gradleEnv").toLowerCase().contains("dev")) {
println("Running dev configuration")
setVersion(getVersion() + "-SNAPSHOT")
project.ext.uploadUrl = "https://artifactory.iatlas.dev/snapshots/"
}
gradleLint.rules = ['dependency-parentheses', 'dependency-tuple', 'dependency-all']
configurations {
// for dependencies that are needed for development only
developmentOnly
println("Version: ${getVersion()}")
println("Upload url: ${project.ext.uploadUrl}")
}
dependencies {
kapt(platform("io.micronaut.platform:micronaut-platform:$micronautVersion"))
kapt "io.micronaut.validation:micronaut-validation"
kapt "io.micronaut:micronaut-inject-java"
kapt "io.micronaut:micronaut-graal"
kapt 'io.micronaut.openapi:micronaut-openapi'
kapt 'io.micronaut.security:micronaut-security-annotations'
compileOnly(platform("io.micronaut.platform:micronaut-platform:"))
compileOnly 'org.graalvm.nativeimage:svm:23.1.2'
implementation(platform("io.micronaut.platform:micronaut-platform"))
runtimeOnly "io.micronaut:micronaut-management:"
implementation "io.micronaut:micronaut-jackson-databind"
implementation "io.swagger.core.v3:swagger-annotations"
implementation "io.micronaut:micronaut-inject"
//implementation "io.micronaut:micronaut-validation:3.9.4"
implementation 'io.micronaut.rxjava3:micronaut-rxjava3'
implementation 'io.micronaut.kotlin:micronaut-kotlin-runtime'
implementation "io.micronaut:micronaut-runtime"
implementation "io.micronaut:micronaut-http-server-netty"
implementation "io.micronaut:micronaut-http-client"
implementation "io.micronaut.reactor:micronaut-reactor"
implementation "io.micronaut.tracing:micronaut-tracing-annotation"
implementation 'io.micronaut.security:micronaut-security'
implementation 'io.micronaut.security:micronaut-security-jwt'
implementation 'io.micronaut.kotlin:micronaut-kotlin-extension-functions'
implementation 'io.micronaut.mongodb:micronaut-mongo-reactive'
implementation "io.micronaut:micronaut-websocket"
implementation "io.micronaut.cache:micronaut-cache-core"
implementation "io.micronaut.cache:micronaut-cache-caffeine"
developmentOnly "io.micronaut.controlpanel:micronaut-control-panel-ui"
developmentOnly "io.micronaut.controlpanel:micronaut-control-panel-management"
annotationProcessor "io.micronaut.validation:micronaut-validation-processor"
implementation "io.micronaut.validation:micronaut-validation"
implementation "io.reactivex.rxjava3:rxkotlin:3.0.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}"
implementation "org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}"
//implementation 'javax.annotation:javax.annotation-api:1.3.2'
implementation "io.micronaut.tracing:micronaut-tracing-jaeger"
implementation "io.opentracing.brave:brave-opentracing:1.0.1"
implementation 'io.zipkin.brave:brave-context-log4j2:5.16.0'
runtimeOnly "io.zipkin.brave:brave-instrumentation-httpclient:5.16.0"
runtimeOnly "io.zipkin.reporter:zipkin-reporter:1.1.2"
implementation "com.google.code.gson:gson:2.11.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
implementation "com.github.mwiede:jsch:0.2.15"
//implementation('org.litote.kmongo:kmongo:4.7.2')
implementation 'org.litote.kmongo:kmongo-coroutine:4.11.0'
implementation "com.fasterxml.jackson.module:jackson-module-kotlin"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
// Shell commands
implementation 'com.lordcodes.turtle:turtle:0.9.0'
// https://mvnrepository.com/artifact/org.jasypt/jasypt
// used for De-Encryption
implementation 'org.jasypt:jasypt:1.9.3'
// My stuff
implementation "technology.iatlas.sws:sws:1.5.1-SNAPSHOT"
implementation "org.codehaus.janino:janino:3.1.12"
implementation 'ch.qos.logback:logback-classic:1.4.14'
implementation 'org.slf4j:log4j-over-slf4j:2.0.12'
//runtimeOnly("ch.qos.logback:logback-classic")
runtimeOnly 'com.fasterxml.jackson.module:jackson-module-kotlin:2.17.0'
runtimeOnly 'io.netty:netty-tcnative:2.0.62.Final'
runtimeOnly 'io.netty:netty-tcnative-boringssl-static:2.0.62.Final'
implementation "org.reflections:reflections:0.10.2"
kaptTest(enforcedPlatform("io.micronaut.platform:micronaut-platform:$micronautVersion"))
kaptTest "io.micronaut:micronaut-inject-java:$micronautVersion"
testImplementation(enforcedPlatform("io.micronaut.platform:micronaut-platform:$micronautVersion"))
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
testImplementation "io.micronaut.test:micronaut-test-junit5:4.1.0"
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
// Docker Testcontainer
testImplementation 'org.testcontainers:testcontainers:1.19.7'
}
test.classpath += configurations.developmentOnly
mainClassName = "technology.iatlas.spaceup.ApplicationKt"
// use JUnit 5 platform
test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}
allOpen {
annotation("io.micronaut.aop.Around")
}
kapt {
arguments {
arg("micronaut.processing.incremental", true)
arg("micronaut.processing.annotations", "technology.iatlas.spaceup.*")
arg("micronaut.processing.group", "technology.iatlas.spaceup")
arg("micronaut.processing.module", "SpaceUp-Server")
arg("micronaut.openapi.views.spec",
"redoc.enabled=true,rapidoc.enabled=true," +
"swagger-ui.enabled=true,swagger-ui.theme=material")
}
}
tasks.withType(PublishToMavenRepository) { task ->
dependsOn("assemble")
}
def generatedVersionDir = "${buildDir}/generated-version"
sourceSets {
main {
output.dir(generatedVersionDir, builtBy: 'generatedVersion')
}
}
tasks.register("generatedVersion") {
doLast {
def propertiesFile = file "$generatedVersionDir/version.properties"
propertiesFile.parentFile.mkdirs()
def properties = new Properties()
properties.setProperty("version", rootProject.version.toString())
propertiesFile.withWriter { properties.store(it, null) }
}
}
processResources {
dependsOn tasks.named("generatedVersion")
dependsOn tasks.named("projectReport")
//dependsOn tasks.named("asciidoctor")
}
shadowJar {
//minimize()
mergeServiceFiles()
}
tasks.withType(JavaExec) {
classpath += configurations.developmentOnly
jvmArgs('-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
if (gradle.startParameter.continuous) {
systemProperties(
'micronaut.io.watch.restart':'true',
'micronaut.io.watch.enabled':'true',
"micronaut.io.watch.paths":"src/main"
)
}
}
graalvmNative {
binaries {
main {
imageName.set('SpaceUp-Server')
buildArgs.add('--verbose')
}
}
}
publishing {
publications {
maven(MavenPublication) {
artifact("build/libs/SpaceUp-$version"+"-all.jar") {
extension 'jar'
}
}
}
repositories {
maven {
name "Maven"
url project.ext.uploadUrl
credentials {
username "${nexusUsername}"
password "${nexusPassword}"
}
}
}
}