-
Notifications
You must be signed in to change notification settings - Fork 35
/
build.gradle
125 lines (105 loc) · 2.84 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
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.15.0"
}
}
apply plugin: 'com.gradle.plugin-publish'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'groovy'
group = 'com.github.maiflai'
description = 'gradle-scalatest is a Gradle plugin for executing scalatest tests'
ext {
websiteUrl = 'https://github.com/maiflai/gradle-scalatest'
sourceUrl = 'https://github.com/maiflai/gradle-scalatest.git'
}
targetCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation gradleApi()
implementation localGroovy()
testImplementation 'junit:junit:4.12'
}
task groovydocJar(type: Jar, dependsOn: groovydoc) {
from "$buildDir/docs/groovydoc"
archiveClassifier = 'groovydoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier = 'sources'
}
test.dependsOn(jar)
test {
testLogging.showStandardStreams = System.env.CI == 'true'
}
if (project.version == 'unspecified') {
version = '0.1-SNAPSHOT'
}
task showVersion() { doLast { println(project.version) } }
def propOrDefault(String property) {
if (project.hasProperty(property)) {
return project.getProperty(property)
} else {
return ''
}
}
pluginBundle {
website = project.websiteUrl
vcsUrl = project.sourceUrl
description = project.description
tags = ['testing', 'scala', 'scalatest']
plugins {
scalatestPlugin {
id = 'com.github.maiflai.scalatest'
displayName = 'Gradle ScalaTest plugin'
}
}
}
publishing {
repositories {
maven {
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials(PasswordCredentials) {
username = propOrDefault('sonatypeUsername')
password = propOrDefault('sonatypePassword')
}
}
}
publications {
mavenJava(MavenPublication) {
pom {
name = project.name
description = project.description
url = project.websiteUrl
scm {
url = "scm:git:${project.sourceUrl}"
}
licenses {
license {
name = 'unlicense'
url = 'http://unlicense.org'
distribution = 'repo'
}
}
developers {
developer {
id = 'maiflai'
}
}
}
from components.java
artifact groovydocJar
artifact sourcesJar
}
}
}
signing {
sign publishing.publications.mavenJava
}