-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
111 lines (97 loc) · 3.06 KB
/
build.gradle.kts
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
repositories {
mavenCentral()
}
plugins {
id("java-library")
id("groovy")
id("maven-publish")
id("signing")
id("jacoco")
id("org.sonarqube").version("4.4.1.3373")
}
version = project.properties["wiclax4j.version"] as String
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
withJavadocJar()
}
tasks.test {
useJUnitPlatform()
}
dependencies {
compileOnly("org.projectlombok:lombok:1.18.34")
annotationProcessor("org.projectlombok:lombok:1.18.34")
testImplementation("org.apache.groovy:groovy-all:4.0.23")
testImplementation("org.spockframework:spock-core:2.3-groovy-4.0")
testImplementation("net.bytebuddy:byte-buddy:1.15.3")
testImplementation("org.objenesis:objenesis:3.4")
}
publishing {
repositories {
maven {
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.properties["nexus.username"] as String?
password = project.properties["nexus.password"] as String?
}
}
}
publications {
create("mavenJava", MavenPublication::class.java) {
groupId = "com.github.csutorasa.wiclax4j"
artifactId = "wiclax4j"
version = project.version as String
from(components["java"])
pom {
name.set("Wiclax4j")
description.set("This is a pure java generic acquisition Wiclax server implementation")
url.set("https://www.github.com/csutorasa/wiclax4j")
licenses {
license {
name.set("The MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("csutorasa")
name.set("Ármin Csutorás")
email.set("[email protected]")
organizationUrl.set("https://github.com/csutorasa")
}
}
scm {
connection.set("https://github.com/csutorasa/wiclax4j.git")
developerConnection.set("https://github.com/csutorasa/wiclax4j.git")
url.set("https://github.com/csutorasa/wiclax4j")
}
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}
jacoco {
toolVersion = "0.8.11"
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
xml.required.set(true)
}
}
tasks.sonarqube {
dependsOn(tasks.jacocoTestReport)
}
sonarqube {
properties {
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.organization", "csutorasa")
property("sonar.branch.name", "master")
property("sonar.login", System.getenv("SONAR_TOKEN"))
property("sonar.sourceEncoding", "UTF-8")
property("sonar.gradle.skipCompile", "true")
}
}