-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
89 lines (75 loc) · 1.95 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
plugins {
id 'java-library'
// maven-publish is the successor of maven plugin
// Also required by https://github.com/gradle-nexus/publish-plugin?tab=readme-ov-file
id 'maven-publish'
id 'signing'
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
}
apply plugin: 'java'
group = 'io.github.adr'
version = '2.0.0-SNAPSHOT'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.3'
testImplementation 'org.junit.platform:junit-platform-launcher:1.11.3'
}
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
test {
useJUnitPlatform()
}
jar {
manifest {
attributes('Automatic-Module-Name': 'io.github.adr')
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'e-adr'
from components.java
pom {
name ='Embedded Architectural Decision Records'
description = 'Architectural Decision Records embedded in Java code'
url = 'https://github.com/adr/e-adr/'
licenses {
license {
name = 'Eclipse Public License - v 2.0'
url = 'https://www.eclipse.org/org/documents/epl-2.0/'
}
}
developers {
developer {
id = 'koppor'
name = 'Oliver Kopp'
email = '[email protected]'
}
}
scm {
url = 'https://github.com/adr/e-adr'
connection = 'scm:git:https://github.com/adr/e-adr.git'
developerConnection = 'scm:git:github.com:adr/e-adr.git'
}
}
}
}
}
signing {
required = isReleaseVersion
useInMemoryPgpKeys(System.getenv("SIGNING_KEY"), System.getenv("SIGNING_PASSWORD"))
sign publishing.publications.mavenJava
}
nexusPublishing {
repositories {
// e-adr was registered before 2021
sonatype()
}
}