-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
104 lines (90 loc) · 2.79 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
plugins {
id 'java'
id 'com.diffplug.spotless' version '6.25.0'
id 'maven-publish'
id 'signing'
}
group = 'io.github.surajkumar'
version = '1.2.0'
repositories {
mavenCentral()
}
java {
withJavadocJar()
withSourcesJar()
}
spotless {
java {
importOrder()
googleJavaFormat()
.aosp()
.reflowLongStrings()
.formatJavadoc(true)
.reorderImports(true)
.groupArtifact('com.google.googlejavaformat:google-java-format')
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}
dependencies {
implementation 'org.apache.logging.log4j:log4j-api:2.23.1'
implementation 'org.apache.logging.log4j:log4j-core:2.22.1'
testImplementation 'org.mockito:mockito-core:5.12.0'
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
test {
useJUnitPlatform()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId = 'io.github.surajkumar'
artifactId = 'concurrency-library'
version = '1.0.0'
pom {
name = 'Concurrency Library'
description = 'A library for concurrent programming'
url = 'https://github.com/surajkumar/concurrency-library'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'surajkumar'
name = 'Suraj Kumar'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/surajkumar/concurrency-library.git'
developerConnection = 'scm:git:ssh://github.com/surajkumar/concurrency-library.git'
url = 'https://github.com/surajkumar/concurrency-library'
}
}
}
}
repositories {
maven {
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.findProperty("ossrhUsername") ?: System.getenv("OSSRH_USERNAME")
password = project.findProperty("ossrhPassword") ?: System.getenv("OSSRH_PASSWORD")
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.mavenJava
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}