-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
108 lines (96 loc) · 2.51 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
plugins {
id 'java-library'
id 'maven-publish'
id 'org.javamodularity.moduleplugin' version '1.8.12'
id "org.gradlex.extra-java-module-info" version "1.4"
id 'io.spring.dependency-management' version '1.1.3'
}
group = 'io.edpn.backend'
version = '0.2.0-SNAPSHOT'
compileJava.options.encoding = 'UTF-8'
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
toolchain {
languageVersion=JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
maven {
url 'https://nexus.edpn.io/repository/maven-releases/'
}
if (version.endsWith('-SNAPSHOT')) { //disallow snapshot dependencies in releases
maven {
url 'https://nexus.edpn.io/repository/maven-snapshots/'
}
}
}
dependencies {
}
test {
systemProperty "file.encoding", "utf-8"
useJUnitPlatform()
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
tasks.named('test') {
useJUnitPlatform()
}
tasks.withType(JavaCompile).tap {
configureEach {
options.encoding = 'UTF-8'
}
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
backendUtil(MavenPublication) {
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
}
}
}
repositories {
maven {
def nexusUsername = findProperty('edpnNexusUsername')
def nexusPassword = findProperty('edpnNexusPassword')
if (nexusUsername && nexusPassword) {
credentials {
username = nexusUsername
password = nexusPassword
}
}
if (version.endsWith('-SNAPSHOT')) {
url 'https://nexus.edpn.io/repository/maven-snapshots/'
} else {
url 'https://nexus.edpn.io/repository/maven-releases/'
}
}
}
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}