forked from InspireNXE/VanillaSkills
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
122 lines (103 loc) · 3.54 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
plugins {
id 'org.spongepowered.plugin' version '0.9.0'
id 'net.minecrell.licenser' version '0.4.1'
id 'maven'
id 'signing'
}
group = project.group
version = project.version
description = project.description
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
archivesBaseName = project.name.toLowerCase()
defaultTasks 'clean', 'updateLicenses', 'build'
sponge {
plugin {
id = 'vanilla_skills'
}
}
repositories {
mavenLocal()
mavenCentral()
maven {
name = 'oss-sonatype-public'
url = 'https://oss.sonatype.org/content/repositories/public/'
}
maven {
name = 'sponge'
url = 'http://repo.spongepowered.org/maven'
}
}
dependencies {
compile "org.inspirenxe:skills:${project.skillsVersion}"
compile "org.spongepowered:spongeapi:${project.spongeAPIVersion}"
compile "net.kyori:filter:${project.filterVersion}"
}
license {
header project.file('header.txt')
include '**/*.java'
exclude 'src/main/generated/**'
newLine false
}
tasks.withType(JavaCompile) {
options.compilerArgs += ['-Xlint:all', '-Xlint:-path', '-parameters']
options.deprecation = true
options.encoding = 'UTF-8'
}
if (JavaVersion.current().isJava8Compatible() || JavaVersion.current().isJava9Compatible()) {
tasks.withType(Javadoc) {
// disable the crazy super-strict doclint tool in Java 8
options.addStringOption('Xdoclint:none', '-quiet')
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
signing {
required {!project.version.endsWith('-SNAPSHOT') && gradle.taskGraph.hasTask(':uploadArchives')}
sign configurations.archives
}
if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) {
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment {MavenDeployment deployment -> signing.signPom(deployment)}
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.project {
description 'Shared code useful for anyone working with the Sponge ecosystem'
name project.name
url 'https://github.com/InspireNXE/VanillaSkills/'
developers {
developer {
name 'zidane'
}
}
issueManagement {
system 'GitHub Issues'
url 'https://github.com/InspireNXE/VanillaSkills/issues'
}
licenses {
license {
name 'MIT License'
url 'https://opensource.org/licenses/MIT'
}
}
scm {
connection 'scm:[email protected]:InspireNXE/VanillaSkills.git'
developerConnection 'scm:[email protected]:InspireNXE/VanillaSkills.git'
url 'https://github.com/InspireNXE/VanillaSkills/'
}
}
}
}
}
}