-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
115 lines (98 loc) · 3.25 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
group 'ninja.smirking'
version '1.0-SNAPSHOT'
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.6.3"
}
}
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'maven-publish'
apply plugin: 'jacoco'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'java'
sourceCompatibility = 1.8
def spigotVersion = '1.8.8-R0.1-SNAPSHOT'
def powermockVersion = '1.6.4'
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
url 'https://hub.spigotmc.org/nexus/content/groups/public'
}
}
dependencies {
compile group: 'org.spigotmc', name: 'spigot-api', version: spigotVersion
testCompile group: 'org.powermock', name: 'powermock-module-testng', version: powermockVersion
testCompile group: 'org.powermock', name: 'powermock-api-mockito', version: powermockVersion
testCompile group: 'org.testng', name: 'testng', version: '6.9.10'
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}
test {
useTestNG() {
suites 'src/test/resources/suite.xml'
}
jacoco {
append = false
}
}
task sourceJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allJava
classifier 'src'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier 'javadoc'
}
javadoc {
configure(options) {
options.links('https://docs.oracle.com/javase/8/docs/api/')
options.links('https://hub.spigotmc.org/javadocs/spigot/')
}
}
publishing {
repositories {
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
credentials {
username System.getenv("REPOSITORY_USERNAME")
password System.getenv("REPOSITORY_PASSWORD")
}
}
}
publications {
maven(MavenPublication) {
artifact javadocJar
artifact sourceJar
artifact jar
pom.withXml {
asNode().appendNode('url', 'https://github.com/Fireflies/bukkit-events-api')
asNode().appendNode('description', 'Fancy event handling for Bukkit')
def license = asNode().appendNode('licenses').appendNode('license')
license.appendNode('name', 'BSD License')
license.appendNode('url', 'https://github.com/Fireflies/bukkit-events-api/blob/master/src/main/resources/LICENSE')
license.appendNode('distribution', 'repo')
def dependency = asNode().appendNode('dependencies').appendNode('dependency')
dependency.appendNode('groupId', 'org.spigotmc')
dependency.appendNode('artifactId', 'spigot-api')
dependency.appendNode('version', spigotVersion)
dependency.appendNode('scope', 'provided')
def repositories = asNode().appendNode('repositories').appendNode('repository')
repositories.appendNode('id', 'spigot-repo')
repositories.appendNode('url', 'https://hub.spigotmc.org/nexus/content/groups/public')
}
}
}
}