-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
112 lines (94 loc) · 3.98 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
plugins {
id 'groovy'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'io.micronaut.application' version '4.4.4'
id 'jacoco'
id 'org.sonarqube' version '6.0.1.5171'
id 'com.github.kt3k.coveralls' version '2.12.2'
id 'com.diffplug.spotless' version '6.25.0'
}
version = '2.3.0'
group = 'io.github.devatherock'
repositories {
mavenCentral()
}
micronaut {
runtime('netty')
processing {
incremental(true)
annotations('io.github.devatherock.ldapsearch.*')
}
}
dependencies {
def lombokVersion = '1.18.36'
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: lombokVersion
annotationProcessor("io.micronaut.openapi:micronaut-openapi")
annotationProcessor("io.micronaut.validation:micronaut-validation-processor")
compileOnly group: 'org.projectlombok', name: 'lombok', version: lombokVersion
compileOnly group: 'com.google.code.findbugs', name: 'annotations', version: '3.0.1'
compileOnly("org.graalvm.nativeimage:svm")
implementation("io.micronaut.validation:micronaut-validation")
implementation("io.micronaut:micronaut-runtime")
implementation("io.swagger.core.v3:swagger-annotations")
implementation("io.micronaut:micronaut-management")
implementation("io.micronaut.micrometer:micronaut-micrometer-core")
implementation("io.micronaut:micronaut-jackson-databind")
implementation group: 'net.logstash.logback', name: 'logstash-logback-encoder', version: '8.0'
implementation group: 'org.codehaus.janino', name: 'janino', version: '3.1.12'
implementation group: 'javax.inject', name: 'javax.inject', version: '1'
implementation "ch.qos.logback:logback-classic:1.5.12"
runtimeOnly("org.yaml:snakeyaml")
testImplementation group: 'org.spockframework', name: 'spock-core', version: '2.3-groovy-4.0'
testImplementation group: 'net.bytebuddy', name: 'byte-buddy', version: '1.15.11'
testImplementation group: 'org.objenesis', name: 'objenesis', version: '3.4'
testImplementation group: 'io.micronaut.test', name: 'micronaut-test-spock'
testImplementation group: 'com.unboundid', name: 'unboundid-ldapsdk', version: '7.0.2'
testImplementation group: 'io.micronaut', name: 'micronaut-http-client'
testImplementation group: 'org.apache.groovy', name: 'groovy-json', version: '4.0.24'
}
application {
mainClass.set("io.github.devatherock.ldapsearch.Application")
}
java {
sourceCompatibility = JavaVersion.toVersion("17")
targetCompatibility = JavaVersion.toVersion("17")
}
compileJava {
// To address 'package com.sun.jndi.ldap is declared in module java.naming, which does not export it' error in Java 17
options.compilerArgs += [
'--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED'
]
}
tasks.withType(Test) {
useJUnitPlatform()
}
run {
systemProperties(System.properties)
}
ext.jacoco = [
exclusions: [
'io/github/devatherock/ldapsearch/Application.class',
'io/github/devatherock/ldapsearch/config/GraalConfig.class',
],
coverageThresholds: [
'io.github.devatherock.logback.LogbackConfigInitializer': [
'BRANCH': 0.75,
'COMPLEXITY': 0.62,
'INSTRUCTION': 0.89,
'LINE': 0.88
],
]
]
apply from: "${getPropertyValue('gradle.includes.location', 'https://raw.githubusercontent.com/devatherock/gradle-includes/master')}/native.gradle"
apply from: "${getPropertyValue('gradle.includes.location', 'https://raw.githubusercontent.com/devatherock/gradle-includes/master')}/integration.gradle"
apply from: "${getPropertyValue('gradle.includes.location', 'https://raw.githubusercontent.com/devatherock/gradle-includes/master')}/checks.gradle"
/**
* Fetches the value of a gradle property
*
* @param propertyName
* @param propertyValueDefault
* @return the property value
*/
String getPropertyValue(String propertyName, String propertyValueDefault = null) {
return project.hasProperty(propertyName) ? project[propertyName] : propertyValueDefault
}