-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
130 lines (116 loc) · 4.27 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
plugins {
id 'java-library'
id 'java'
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
id 'com.palantir.git-version' version '3.1.0'
id 'org.jetbrains.kotlin.jvm' version '2.0.21'
}
apply from: 'hooks.gradle'
repositories {
mavenCentral()
mavenLocal()
}
group = 'io.github.lsd-consulting'
version = gitVersion().replaceAll("^v", "")
logger.lifecycle("Version:$version")
ext {
junitJupiter = '5.11.3'
}
wrapper {
gradleVersion = "8.7"
}
allprojects {
plugins.withId('java') {
dependencies {
implementation 'io.github.lsd-consulting:lsd-core:7.0.59'
implementation 'io.github.lsd-consulting:lsd-formatting-library:4.0.62'
testImplementation 'org.assertj:assertj-core:3.26.3'
testImplementation 'io.mockk:mockk-jvm:1.13.13'
testImplementation "org.junit.jupiter:junit-jupiter:$junitJupiter"
}
}
}
subprojects {
plugins.withId('java-library') {
tasks.register('sourcesJar', Jar) {
dependsOn classes
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
tasks.register('javadocJar', Jar) {
archiveClassifier = 'javadoc'
from javadoc
}
apply plugin: 'maven-publish'
publishing {
publications {
"$project.name"(MavenPublication) {
groupId = 'io.github.lsd-consulting'
artifactId project.name
version = "${gitVersion().replaceAll("^v", "")}"
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = "lsd-interceptors"
description = "Provides various interceptors to capture events for the lsd-core library to generate sequence diagrams"
url = 'https://github.com/lsd-consulting/lsd-interceptors.git'
licenses {
license {
name = "MIT License"
url = "https://github.com/lsd-consulting/lsd-interceptors/blob/main/LICENSE.txt"
distribution = "repo"
}
}
developers {
developer {
name = "Nick"
email = "nicholas.mcdowall@gmail.com"
organization = 'NKM IT Solutions Ltd'
organizationUrl = 'https://github.com/nickmcdowall'
}
developer {
name = "Lukasz"
email = "lukasz.gryzbon@gmail.com"
organization = 'Integreety Ltd.'
organizationUrl = 'https://github.com/integreety'
}
}
scm {
url = "https://github.com/lsd-consulting/lsd-interceptors.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
} else {
// Use signing properties in ~/.gradle/gradle.properties
sign publishing.publications
}
}