-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.gradle
118 lines (98 loc) · 3.15 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
plugins {
id 'java'
id 'maven-publish'
id 'signing'
}
group 'com.samjakob'
version '1.4.0'
uri "https://github.com/SamJakob/SpiGUI"
java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
maven {
// Sonatype (for bungeecord-chat used by Spigot)
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
// Spigot Nexus
url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}
}
dependencies {
// Spigot API
compileOnly group: 'org.spigotmc', name: 'spigot-api', version: '1.8.8-R0.1-SNAPSHOT'
testCompileOnly group: 'org.spigotmc', name: 'spigot-api', version: '1.8.8-R0.1-SNAPSHOT'
}
// Builds Spigot runnable plugin from the test package.
// Can be used to demonstrate and test functionality.
tasks.register('testJar', Jar) {
from sourceSets.main.output.classesDirs
from sourceSets.test.output.classesDirs
from('src/test/resources') {
include '**'
}
archiveBaseName.set("SpiGUITest")
}
publishing {
publications {
SpiGUI(MavenPublication) {
pom {
name = "SpiGUI"
description = "A comprehensive GUI API for Spigot with pages support."
url = 'https://github.com/SamJakob/SpiGUI'
packaging = 'jar'
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
name = 'SamJakob'
email = '[email protected]'
organization = 'SamJakob'
organizationUrl = 'https://samjakob.com'
}
}
scm {
connection = 'scm:git:git://github.com/SamJakob/SpiGUI.git'
developerConnection = 'scm:git:ssh://github.com:SamJakob/SpiGUI.git'
url = 'https://github.com/SamJakob/SpiGUI'
}
}
from components.java
}
}
repositories {
maven {
url = version.endsWith('SNAPSHOT')
// If the version ends with SNAPSHOT, we're building a snapshot
// so deploy to a SNAPSHOT repository.
? 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
// Otherwise, deploy to a staging repository.
: 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.SpiGUI
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
source = sourceSets.main.java.sourceDirectories
classpath += configurations.compileClasspath
options.memberLevel = JavadocMemberLevel.PRIVATE
}