-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
139 lines (122 loc) · 4.4 KB
/
build.gradle.kts
File metadata and controls
139 lines (122 loc) · 4.4 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import java.net.URI
group = "org.github.silverbulleters"
version = gitVersionCalculator.calculateVersion("v")
var javaVersion = JavaVersion.VERSION_11
var encoding = "UTF-8"
val junitVersion = "5.6.1"
var log4jVersion = "2.14.0"
plugins {
java
`maven-publish`
jacoco
id("io.franzbecker.gradle-lombok") version "4.0.0"
id("com.github.gradle-git-version-calculator") version "1.1.0"
id("net.kyori.indra.license-header") version "1.2.1"
id("org.sonarqube") version "3.3"
}
repositories {
mavenCentral()
maven { url = URI("https://jitpack.io") }
}
java {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
dependencies {
compileOnly("org.projectlombok", "lombok", lombok.version)
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
implementation("com.fasterxml.jackson.core", "jackson-core", "2.12.1")
implementation("com.fasterxml.jackson.core", "jackson-databind", "2.12.1")
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api
implementation("org.apache.logging.log4j", "log4j-api", log4jVersion)
implementation("org.apache.logging.log4j", "log4j-core", log4jVersion)
implementation("org.apache.logging.log4j", "log4j-slf4j-impl", log4jVersion)
implementation("org.jetbrains", "annotations", "16.0.2")
// junit
testImplementation("org.junit.jupiter", "junit-jupiter-api", junitVersion)
testImplementation("org.junit.jupiter", "junit-jupiter-params", junitVersion)
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", junitVersion)
testImplementation("org.assertj", "assertj-core", "3.18.1")
}
tasks.withType<JavaCompile> {
options.encoding = encoding
options.compilerArgs.add("-Xlint:unchecked")
options.compilerArgs.add("-parameters")
}
tasks.test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
reports {
html.isEnabled = true
}
}
tasks.check {
dependsOn(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
reports {
xml.isEnabled = true
xml.destination = File("$buildDir/reports/jacoco/test/jacoco.xml")
}
}
lombok {
version = "1.18.16"
}
license {
header = rootProject.file("HEADER.txt")
ext["year"] = "2020"
ext["name"] = "Team SilverBulleters <team@silverbulleters.org> and contributors"
ext["project"] = "BSL platform context"
exclude("**/*.properties")
exclude("**/*.xml")
exclude("**/*.json")
exclude("**/*.txt")
exclude("**/*.java.orig")
exclude("**/*.impl")
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
pom {
description.set("Platform context 1C:Enterprise 8")
url.set("https://github.com/silverbulleters/bsl-platform-context")
licenses {
license {
name.set("GNU LGPL 3")
url.set("https://www.gnu.org/licenses/lgpl-3.0.txt")
distribution.set("repo")
}
}
developers {
developer {
id.set("team")
name.set("Team Silverbulleters")
email.set("team@silverbulleters.org")
url.set("https://github.com/silverbulleters")
organization.set("silverbulleters")
organizationUrl.set("https://github.com/silverbulleters")
}
}
scm {
connection.set("scm:git:git://github.com/silverbulleters/bsl-platform-context.git")
developerConnection.set("scm:git:git@github.com:silverbulleters/bsl-platform-context.git")
url.set("https://github.com/silverbulleters/bsl-platform-context")
}
}
}
}
}
sonarqube {
properties {
property("sonar.sourceEncoding", "UTF-8")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.organization", "silverbulleters")
property("sonar.projectKey", "silverbulleters_bsl-platform-context")
property("sonar.projectName", "BSL: Platform context")
property("sonar.exclusions", "**/gen/**/*.*")
property("sonar.coverage.jacoco.xmlReportPaths", "$buildDir/reports/jacoco/test/jacoco.xml")
}
}