-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
138 lines (124 loc) · 3.87 KB
/
build.gradle
File metadata and controls
138 lines (124 loc) · 3.87 KB
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
import com.github.spotbugs.snom.SpotBugsTask
plugins {
id 'java-library'
id "com.github.spotbugs" version "4.7.0"
id 'checkstyle'
id 'maven-publish'
// id 'maven'
id 'signing'
}
group = 'io.github.thecodinglog'
version = '0.3.3'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
jcenter()
mavenLocal()
mavenCentral()
}
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
}
spotbugs {
ignoreFailures = false
reportLevel = "high"
spotbugsTest.enabled = false
}
tasks.withType(SpotBugsTask) {
reports {
text.enabled = true
xml.enabled = false
html.enabled = false
}
}
tasks.register("printSpotbugsMain") {
doLast {
File mainResult = file("${buildDir}/reports/spotbugs/main.txt")
if (mainResult.exists()) {
mainResult.readLines().forEach {
println(it)
}
}
}
}
tasks.getByPath("spotbugsMain").finalizedBy("printSpotbugsMain")
java {
withJavadocJar()
withSourcesJar()
}
artifacts {
archives sourcesJar
archives javadocJar
}
test {
useJUnitPlatform()
}
java {
withJavadocJar()
withSourcesJar()
}
dependencies {
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'
implementation('org.springframework:spring-core:5.3.30')
implementation("com.fasterxml.jackson.core:jackson-databind:2.13.5")
implementation 'com.google.code.findbugs:jsr305:3.0.2'
testImplementation 'com.github.javafaker:javafaker:1.0.2'
testImplementation('org.assertj:assertj-core:3.22.0')
testImplementation('org.mockito:mockito-all:1.10.19')
testImplementation('org.junit.jupiter:junit-jupiter-api:5.8.2')
testImplementation("org.apache.logging.log4j:log4j-core:2.17.2")
testImplementation("org.apache.logging.log4j:log4j-slf4j-impl:2.17.2")
testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine')
}
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 'method-invoker'
from components.java
pom {
name = "method-invoker"
description = "Method-Invoker is a tool for invoking methods at runtime using class names and method modifiers."
url = "https://github.com/thecodinglog/method-invoker"
licenses {
license {
name = "MIT License"
url = "https://github.com/thecodinglog/method-invoker/blob/master/LICENSE"
}
}
developers {
developer {
id = "thecodinglog"
name = "Jeongjin Kim"
email = "thefuturecreator@gmail.com"
}
}
scm {
connection = "https://github.com/thecodinglog/method-invoker.git"
developerConnection = "https://github.com/thecodinglog/method-invoker.git"
url = "https://github.com/thecodinglog/method-invoker"
}
}
}
}
}
signing {
def signingKey = System.getenv("SIGNING_KEY")
def signingPassword = System.getenv("SIGNING_PASSWORD")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}