-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
101 lines (90 loc) · 2.86 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
plugins {
id 'groovy'
id 'maven-publish'
id 'java-gradle-plugin'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
id 'com.gradle.plugin-publish' version '1.3.0'
}
group 'cz.augi'
version = version == 'unspecified' ? 'DEVELOPER-SNAPSHOT' : version
repositories {
mavenCentral()
}
dependencies {
api gradleApi()
testImplementation 'junit:junit:4.13.2'
testImplementation gradleTestKit()
testImplementation ('org.spockframework:spock-core:2.3-groovy-3.0') {
exclude group:'org.codehaus.groovy'
}
}
test {
useJUnitPlatform()
testLogging {
events 'failed'
exceptionFormat 'full'
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
project.ext.set('gradle.publish.key', System.getenv('GRADLE_PORTAL_KEY'))
project.ext.set('gradle.publish.secret', System.getenv('GRADLE_PORTAL_SECRET'))
gradlePlugin {
website = 'https://github.com/augi/gradle-wartremover'
vcsUrl = 'https://github.com/augi/gradle-wartremover'
plugins {
wartremoverPlugin {
id = 'cz.augi.gradle.wartremover'
displayName = 'Gradle wartremover plugin'
description = 'Gradle plugin to apply WartRemover (Scala linting tool)'
implementationClass = 'cz.augi.gradle.wartremover.WartremoverPlugin'
tags.set(['scala', 'wartremover'])
}
}
}
afterEvaluate {
publishing.publications.forEach {
it.pom {
name = 'Gradle WartRemover Plugin'
description = 'Gradle plugin to apply WartRemover (Scala linting tool)'
url = 'https://github.com/augi/gradle-wartremover'
licenses {
license {
name = 'The MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id = 'augi'
name = 'Michal Augustýn'
email = 'augustyn.michal@gmail.com'
}
}
scm {
connection = 'scm:git:git://github.com/augi/gradle-wartremover.git'
developerConnection = 'scm:git:ssh://github.com/augi/gradle-wartremover.git'
url = 'https://github.com/augi/gradle-wartremover'
}
}
}
}
signing {
String base64Key = System.getenv('SIGNING_KEY')
if (base64Key) {
useInMemoryPgpKeys(new String(Base64.decoder.decode(base64Key)), System.getenv('SIGNING_PASSWORD'))
sign publishing.publications
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}