-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
113 lines (100 loc) · 3.23 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
plugins {
id 'java'
id 'org.ec4j.editorconfig' version '0.0.3'
id 'checkstyle'
}
allprojects {
repositories {
mavenCentral()
}
group = 'io.github.loom'
version = artifactVersion
}
subprojects {
apply plugin: 'java'
apply plugin: 'org.ec4j.editorconfig'
apply plugin: 'checkstyle'
apply plugin: 'maven-publish'
apply plugin: 'signing'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
java {
withJavadocJar()
withSourcesJar()
}
editorconfig {
excludes = ["build"]
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
}
check.dependsOn editorconfigCheck
checkstyle {
configFile = file("${project.rootDir}/config/checkstyle/checkstyle.xml")
configProperties = ["suppressionFile": "${project.rootDir}/config/checkstyle/checkstyle-suppressions.xml"]
toolVersion = "8.40"
ignoreFailures = false
maxErrors = 0
maxWarnings = 0
}
jar {
manifest {
attributes(
'Specification-Title': artifactName,
'Specification-Version': artifactVersion,
'Specification-Vendor': 'io.github.loom',
'Implementation-Title': artifactName,
'Implementation-Version': artifactVersion,
'Implementation-Vendor': 'io.github.loom'
)
}
}
publishing {
repositories {
maven {
name "OSSRH"
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username System.getenv("MAVEN_USERNAME")
password System.getenv("MAVEN_PASSWORD")
}
}
}
publications {
maven(MavenPublication) {
artifactId artifactId
from components.java
pom {
name = artifactName
description = artifactDescription
url = "https://github.com/loom/loom-java"
licenses {
license {
name = "MIT License"
url = "https://github.com/loom/loom-java/blob/main/LICENSE"
}
}
developers {
developer {
id = "gyuwon"
name = "Gyuwon Yi"
email = "[email protected]"
}
}
scm {
connection = "https://github.com/loom/loom-java.git"
developerConnection = "https://github.com/loom/loom-java.git"
url = "https://github.com/loom/loom-java"
}
}
}
}
}
signing {
def signingKey = System.getenv("SIGNING_KEY")
def signingPassword = System.getenv("SIGNING_PASSWORD")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}
}