-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
116 lines (107 loc) · 3.65 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
plugins {
id 'idea'
id 'info.solidsoft.pitest' version '1.9.11'
id 'com.github.arcticlampyrid.gradle-git-version' version '1.0.4'
}
allprojects { project ->
group 'io.github.joke.spring-factory'
description 'annotation processor for spring factories'
version rootProject.version
repositories {
mavenCentral()
}
plugins.withType(JavaBasePlugin) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
plugins.withType(MavenPublishPlugin) {
project.plugins.apply 'signing'
plugins.withType(JavaPlugin) {
java {
withJavadocJar()
withSourcesJar()
}
}
plugins.withType(SigningPlugin) {
signing {
useGpgCmd()
sign publishing.publications
}
tasks.withType(Sign) {
onlyIf {
gradle.taskGraph.allTasks.any { it.name ==~ /.*PublicationToOSSRH.*/ || it.name ==~ /.*PublicationToGitHub.*/ }
}
}
}
plugins.withType(JacocoPlugin) {
check {
dependsOn jacocoTestCoverageVerification
}
test {
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.enabled true
html.enabled true
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.1
}
}
}
}
}
publishing {
repositories {
maven {
name = 'OSSRH'
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials(PasswordCredentials)
}
maven {
name = 'GitHubPackages'
url = uri("https://maven.pkg.github.com/joke/${project.name}")
credentials(PasswordCredentials)
}
}
afterEvaluate {
tasks.withType(AbstractPublishToMaven)*.dependsOn(check)
publications.each { publication ->
publication.pom {
name = project.name
description = project.description
url = "https://github.com/joke/${project.name}"
licenses {
license {
name = 'Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0'
}
}
developers {
developer {
id = 'joke'
name = 'Joke de Buhr'
email = '[email protected]'
}
}
scm {
connection = "scm:git:git://github.com/joke/${project.name}.git"
developerConnection = "scm:git:git://github.com/joke/${project.name}.git"
url = "http://github.com/joke/${project.name}/tree/master"
}
}
}
}
}
}
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
gradleVersion = '7.4'
}