/
build.gradle
45 lines (37 loc) · 992 Bytes
/
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
// tag::apply[]
// tag::publish[]
plugins {
id 'groovy-gradle-plugin'
// end::apply[]
id 'maven-publish'
// tag::apply[]
}
// end::apply[]
group = 'com.myorg.conventions'
version = '1.0'
publishing {
repositories {
maven {
// change to point to your repo, e.g. http://my.org/repo
url = layout.buildDirectory.dir("repo")
}
}
}
tasks.named('publish') {
dependsOn('check')
}
// end::publish[]
// tag::repositories-and-dependencies[]
repositories {
gradlePluginPortal() // so that external plugins can be resolved in dependencies section
}
dependencies {
implementation 'com.github.spotbugs.snom:spotbugs-gradle-plugin:5.2.1'
testImplementation platform("org.spockframework:spock-bom:2.2-groovy-3.0")
testImplementation 'org.spockframework:spock-core'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
tasks.named('test', Test) {
useJUnitPlatform()
}
// end::repositories-and-dependencies[]