-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
109 lines (91 loc) · 2.85 KB
/
build.gradle
File metadata and controls
109 lines (91 loc) · 2.85 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
plugins {
id 'java'
id 'application'
id 'jacoco'
id 'org.sonarqube' version '6.0.1.5171'
}
group = 'org.openmbee.flexo'
version = '0.1.0'
sourceCompatibility = '17'
targetCompatibility = '17'
repositories {
mavenCentral()
}
dependencies {
// CLI framework
implementation 'info.picocli:picocli:4.7.5'
annotationProcessor 'info.picocli:picocli-codegen:4.7.5'
// HTTP client
implementation 'org.apache.httpcomponents.client5:httpclient5:5.3'
// RDF/Turtle parsing (matching flexo-mms-layer1-service)
implementation 'org.apache.jena:jena-arq:4.10.0'
// JSON processing
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0'
// SSH key operations and JWT
implementation 'org.bouncycastle:bcpkix-jdk18on:1.78'
implementation 'io.jsonwebtoken:jjwt-api:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.3'
// Logging
implementation 'org.slf4j:slf4j-api:2.0.9'
implementation 'ch.qos.logback:logback-classic:1.5.18'
// Testing
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0'
testImplementation 'org.mockito:mockito-core:5.8.0'
}
application {
mainClass = 'org.openmbee.flexo.cli.FlexoCLI'
}
tasks.named('test') {
useJUnitPlatform()
}
// Create a distribution with all dependencies
distributions {
main {
distributionBaseName = 'flexo'
}
}
// Create start scripts
startScripts {
applicationName = 'flexo'
}
// Task to generate a fat JAR (exclude signing files from deps to avoid SecurityException)
tasks.register('fatJar', Jar) {
archiveClassifier = 'all'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes 'Main-Class': 'org.openmbee.flexo.cli.FlexoCLI'
}
// Unpack runtime classpath but drop all META-INF signature files so the
// resulting fat JAR is not "partially signed" (which breaks jar verification).
from {
configurations.runtimeClasspath.collect { file ->
file.isDirectory() ? file : zipTree(file).matching {
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.EC'
}
}
}
// Also include this project's compiled classes/resources
with jar
}
tasks.test {
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
}
tasks.jacocoTestReport {
dependsOn tasks.test
reports {
xml.required.set(true)
html.required.set(true)
}
}
// SonarQube configuration
sonar {
properties {
property 'sonar.projectKey', 'Open-MBEE_flexo-cli-client'
property 'sonar.organization', 'openmbee'
property 'sonar.host.url', 'https://sonarcloud.io'
property 'sonar.java.source', '17'
property 'sonar.java.target', '17'
property 'sonar.sourceEncoding', 'UTF-8'
}
}