forked from lsd-consulting/lsd-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
144 lines (127 loc) · 4.14 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.8.10'
id("org.jetbrains.dokka") version "1.8.10"
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
id 'com.palantir.git-version' version '0.12.3'
id 'jacoco'
}
apply from: 'hooks.gradle'
group = 'io.github.lsd-consulting'
version = gitVersion().replaceAll("^v", "")
repositories {
mavenCentral()
mavenLocal()
}
kotlin {
jvmToolchain(11)
}
dependencies {
implementation 'com.github.jknack:handlebars:4.3.1'
implementation 'net.sourceforge.plantuml:plantuml-mit:1.2023.7'
testImplementation 'org.assertj:assertj-core:3.24.2'
testImplementation 'com.approvaltests:approvaltests:18.6.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.2'
testImplementation 'org.junit-pioneer:junit-pioneer:1.7.2'
testImplementation "org.mockito.kotlin:mockito-kotlin:4.1.0"
testImplementation 'com.microsoft.playwright:playwright:1.32.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
}
jacocoTestReport {
reports {
xml.enabled(true)
html.enabled(true)
html.setDestination(project.provider(() -> new File("${project.buildDir}/reports/coverage")))
}
}
test {
useJUnitPlatform()
testLogging {
events "failed"
exceptionFormat "full"
}
finalizedBy jacocoTestReport
}
java {
withSourcesJar()
}
tasks.register('javadocJar', Jar) {
dependsOn(dokkaJavadoc)
archiveClassifier = 'javadoc'
from dokkaHtml.outputDirectory
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = "$group"
artifactId = 'lsd-core'
version = "${version}"
from components.kotlin
artifact sourcesJar
artifact javadocJar
pom {
name = 'lsd-core'
description = 'A library used to generate living sequence diagrams'
url = 'https://github.com/lsd-consulting/lsd-core.git'
licenses {
license {
name = "MIT License"
url = "https://github.com/lsd-consulting/lsd-core/blob/main/LICENSE.txt"
distribution = "repo"
}
}
developers {
developer {
name = "Nick"
email = "[email protected]"
organization = 'NKM IT Solutions'
organizationUrl = 'https://github.com/nickmcdowall'
}
developer {
name = "Lukasz"
email = "[email protected]"
organization = 'Integreety Ltd.'
organizationUrl = 'https://github.com/integreety'
}
}
scm {
url = "https://github.com/lsd-consulting/lsd-core.git"
}
}
repositories {
maven {
name = 'sonatype'
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials(PasswordCredentials)
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
signing {
if (project.findProperty("signingKey")) {
// Use in-memory ascii-armored keys
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
} else {
// Use signing properties in ~/.gradle/gradle.properties
sign publishing.publications.mavenJava
}
}