forked from Mojang/brigadier
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
100 lines (88 loc) · 2.24 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
apply plugin: 'java-library'
apply plugin: 'maven-publish'
group = 'com.velocitypowered'
version = project.hasProperty('buildNumber') ? "${project.majorMinor}.${project.buildNumber}" : "${project.majorMinor}.0-SNAPSHOT"
buildscript {
repositories {
mavenCentral()
maven {
url "https://libraries.minecraft.net"
}
}
}
repositories {
maven {
url "https://libraries.minecraft.net"
}
mavenCentral()
}
java {
withSourcesJar();
}
dependencies {
testImplementation 'com.google.guava:guava:26.0-jre'
testImplementation 'junit:junit-dep:4.11'
testImplementation 'org.hamcrest:hamcrest-library:1.3'
testImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'com.google.guava:guava-testlib:26.0-jre'
testImplementation 'org.openjdk.jmh:jmh-core:1.21'
annotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.21'
}
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/main/resources']
}
}
test {
java {
srcDirs = ['src/test/java']
}
resources {
srcDirs = ['src/test/resources']
}
}
}
test {
testLogging {
events "failed", "skipped"
showStandardStreams = true
showExceptions true
}
}
def targetJavaVersion = 8
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
task report {
doLast {
println "##teamcity[buildNumber '${project.version}']"
}
}
publishing {
repositories {
maven {
credentials {
username System.getenv("NEXUS_USERNAME")
password System.getenv("NEXUS_PASSWORD")
}
name = 'velocity-nexus'
def base = 'https://repo.papermc.io/repository/maven'
def releasesRepoUrl = "$base-releases/"
def snapshotsRepoUrl = "$base-snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}