-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
169 lines (152 loc) · 5.36 KB
/
build.gradle.kts
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.jetbrains.gradle.ext.*
plugins {
`kotlin-dsl`
`maven-publish`
signing
id("de.marcphilipp.nexus-publish") version "0.4.0"
id("com.gradle.plugin-publish") version "0.12.0"
id("org.jetbrains.gradle.plugin.idea-ext") version "0.7"
}
repositories {
mavenCentral()
}
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
group = "org.caffinitas.gradle.testrerun"
version = "0.1"
val readableName = "Rerun tests"
description = "Rerun cached tests and repeated test runs"
gradlePlugin {
plugins {
create("testrerun") {
id = "org.caffinitas.gradle.testrerun"
displayName = readableName
implementationClass = "org.caffinitas.gradle.testrerun.TestRerunPlugin"
}
}
}
pluginBundle {
website = "https://github.com/snazy/gradle-test-rerun/"
vcsUrl = "https://github.com/snazy/gradle-test-rerun/"
description = project.description
tags = listOf("test", "repeat")
plugins {
named("testrerun") {
displayName = readableName
}
}
}
publishing {
publications {
afterEvaluate {
named<MavenPublication>("pluginMaven") {
pom {
name.set(readableName)
description.set(project.description)
inceptionYear.set("2018")
url.set("https://github.com/snazy/gradle-testrerun/")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("snazy")
name.set("Robert Stupp")
email.set("snazy@snazy.de")
}
}
scm {
connection.set("https://github.com/snazy/gradle-testrerun.git")
developerConnection.set("https://github.com/snazy/gradle-testrerun.git")
url.set("https://github.com/snazy/gradle-testrerun/")
}
}
}
named<MavenPublication>("testrerunPluginMarkerMaven") {
pom {
name.set(readableName)
description.set(project.description)
inceptionYear.set("2018")
url.set("https://github.com/snazy/gradle-testrerun/")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("snazy")
name.set("Robert Stupp")
email.set("snazy@snazy.de")
}
}
scm {
connection.set("https://github.com/snazy/gradle-testrerun.git")
developerConnection.set("https://github.com/snazy/gradle-testrerun.git")
url.set("https://github.com/snazy/gradle-testrerun/")
}
}
}
}
}
}
signing {
useGpgCmd()
afterEvaluate {
sign(publishing.publications["pluginMaven"])
sign(publishing.publications["testrerunPluginMarkerMaven"])
}
}
nexusPublishing {
packageGroup.set("org.caffinitas")
repositories {
sonatype {
}
}
}
tasks.named<Wrapper>("wrapper") {
distributionType = Wrapper.DistributionType.ALL
}
idea {
module {
isDownloadSources = true // this is the default BTW
inheritOutputDirs = true
}
project {
withGroovyBuilder {
"settings" {
val copyright: CopyrightConfiguration = getProperty("copyright") as CopyrightConfiguration
val encodings: EncodingConfiguration = getProperty("encodings") as EncodingConfiguration
val delegateActions: ActionDelegationConfig = getProperty("delegateActions") as ActionDelegationConfig
delegateActions.testRunner = ActionDelegationConfig.TestRunner.CHOOSE_PER_TEST
encodings.encoding = "UTF-8"
encodings.properties.encoding = "UTF-8"
copyright.useDefault = "Apache"
copyright.profiles.create("Apache") {
notice = file("gradle/license.txt").readText()
}
}
}
}
}