-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathbuild.gradle
139 lines (121 loc) · 4.63 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
plugins {
id 'io.freefair.git-version'
id 'io.freefair.github.dependency-submission'
id 'io.freefair.maven-central.validate-poms' apply false
id 'io.freefair.lombok' apply false
id "com.gradle.plugin-publish" version "1.3.0" apply false
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
id 'org.jetbrains.kotlin.jvm' apply false
}
nexusPublishing {
repositories {
sonatype {
stagingProfileId = "7e6204597a774f"
}
}
}
allprojects {
repositories {
mavenCentral()
gradlePluginPortal()
}
group = "io.freefair.gradle"
version = rootProject.version
plugins.withId("java") {
java {
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
plugins.apply "jacoco"
plugins.apply "io.freefair.lombok"
plugins.apply "io.freefair.javadoc-links"
jacocoTestReport.reports.xml.required = true
test.useJUnitPlatform()
dependencies {
testImplementation platform("org.junit:junit-bom:5.11.4")
testImplementation 'org.assertj:assertj-core:3.27.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-params'
testImplementation 'org.mockito:mockito-core:5.15.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
tasks.named('jar') {
manifest {
attributes 'Implementation-Version': "$project.version"
}
}
}
tasks.withType(Javadoc).configureEach {
options.links "https://docs.gradle.org/$gradle.gradleVersion/javadoc/"
options.addBooleanOption("Xdoclint:-missing", true)
}
plugins.withId("com.gradle.plugin-publish") {
gradlePlugin {
website = "https://docs.freefair.io/gradle-plugins/$version/reference/"
vcsUrl = 'https://github.com/freefair/gradle-plugins'
}
}
plugins.withId("maven-publish") {
project.apply plugin: 'signing'
project.apply plugin: 'io.freefair.maven-central.validate-poms'
signing {
required = { !version.endsWith('SNAPSHOT') && gradle.taskGraph.hasTask("publish") }
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
}
publishing {
publications.withType(MavenPublication) {
pom {
url = 'https://github.com/freefair/gradle-plugins'
name = provider { project.description }
description = provider { project.description }
inceptionYear = '2016'
licenses {
license {
name = 'MIT'
url = 'https://github.com/freefair/gradle-plugins/blob/master/LICENSE'
}
}
organization {
name = 'FreeFair'
url = 'https://github.com/freefair'
}
developers {
developer {
id = 'larsgrefer'
name = 'Lars Grefer'
email = 'github@larsgrefer.de'
timezone = 'Europe/Berlin'
}
developer {
id = 'frisch12'
name = 'Dennis Fricke'
email = 'dennis.fricke@freefair.io'
timezone = 'Europe/Berlin'
}
}
ciManagement {
system = 'GitHub Actions'
url = 'https://github.com/freefair/gradle-plugins/actions'
}
issueManagement {
system = 'GitHub Issues'
url = 'https://github.com/freefair/gradle-plugins/issues'
}
scm {
connection = 'scm:git:https://github.com/freefair/gradle-plugins.git'
developerConnection = 'scm:git:git@github.com:freefair/gradle-plugins.git'
url = 'https://github.com/freefair/gradle-plugins/'
}
}
}
}
}
}
tasks.named('wrapper') {
distributionType = Wrapper.DistributionType.ALL
}