-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
119 lines (95 loc) · 3.73 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
plugins {
id("com.github.johnrengelman.shadow") version "7.0.0"
id("io.micronaut.application") version "2.0.3"
id("org.javamodularity.moduleplugin") version "1.8.10"
}
version = rootProject.file('VERSION').text.trim()
group = "devex"
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
micronaut {
testRuntime("junit5")
processing {
incremental(true)
annotations("devex.*")
}
}
dependencies {
// patch vulnerable dependencies
implementation("com.fasterxml.jackson.core:jackson-databind:2.9.10.7")
implementation("io.netty:netty-codec:4.1.68.Final")
compileOnly 'org.projectlombok:lombok:1.18.20'
annotationProcessor 'org.projectlombok:lombok:1.18.20'
annotationProcessor("info.picocli:picocli-codegen")
implementation("info.picocli:picocli")
implementation("io.micronaut:micronaut-http-client") {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
exclude group: 'io.netty', module: 'netty-codec'
}
implementation("io.micronaut:micronaut-runtime") {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}
implementation("io.micronaut.picocli:micronaut-picocli") {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}
implementation("io.micronaut:micronaut-validation")
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'ch.qos.logback:logback-classic:1.2.3'
implementation 'io.vavr:vavr:0.10.3'
implementation("io.vavr:vavr-jackson:0.10.3") {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}
implementation 'org.eclipse.jgit:org.eclipse.jgit:5.11.0.202103091610-r'
implementation('org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:5.11.0.202103091610-r') {
exclude module: 'jsch'
}
// original dependency was a multi-version jar and the classes for Java15 were no loading
// implementation 'com.github.mwiede:jsch:0.1.62'
implementation 'com.github.miguelaferreira:jsch:replace-tag-jsch-0.1.63-SNAPSHOT'
implementation 'org.apache.commons:commons-exec:1.3'
// Test dependencies
testCompileOnly 'org.projectlombok:lombok:1.18.20'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.20'
testImplementation 'org.assertj:assertj-core:3.11.1'
testImplementation 'org.assertj:assertj-vavr:0.4.1'
testImplementation("org.junit.jupiter:junit-jupiter-engine") // make gradle compileTestJava work
}
application {
mainClass.set("devex.DevexCommand")
}
java {
modularity.inferModulePath.set(true)
sourceCompatibility = JavaVersion.toVersion("17")
targetCompatibility = JavaVersion.toVersion("17")
}
test {
environment "GITLAB_TOKEN", System.getenv('GITLAB_TOKEN')
environment "GITHUB_TOKEN", System.getenv('GITHUB_TOKEN')
moduleOptions {
runOnClasspath = true
}
// // To trouble shoot failed tests in CI workflows:
// // - uncomment the block bellow
// // - set '--info' in the gradle build step of the workflow
// testLogging {
// // set options for log level LIFECYCLE
// events "failed"
// exceptionFormat "short"
//
// info.showStandardStreams = true
// }
}
// Workaround for using gradle 7.3 with java 17
// src: https://github.com/micronaut-projects/micronaut-gradle-plugin/issues/296
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
processResources {
from("VERSION")
}
modularity.patchModule('java.annotation', 'jsr305-3.0.2.jar')
modularity.patchModule('org.eclipse.jgit', 'org.eclipse.jgit.ssh.jsch-5.11.0.202103091610-r.jar')
modularity.patchModule('io.micronaut.runtime', "micronaut-context-${ext.micronautVersion}.jar")
mainClassName = "$moduleName/devex.DevexCommand"