This repository has been archived by the owner on Apr 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
109 lines (96 loc) · 2.67 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
plugins {
id 'net.ltgt.errorprone' version '1.1.1'
id "io.freefair.lombok" version "5.2.1"
id 'maven-publish'
id 'jacoco'
id 'checkstyle'
id 'java'
}
group = 'dev.shirokuro'
version = '0.11.0'
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
}
dependencies {
compileOnly 'org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT'
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.+'
testImplementation 'org.assertj:assertj-core:3.16.+'
testImplementation 'com.github.seeseemelk:MockBukkit:v1.15-SNAPSHOT'
// ErrorProne
errorprone 'com.google.errorprone:error_prone_core:2.+'
}
if (!JavaVersion.current().isJava9Compatible()) {
dependencies {
errorproneJavac 'com.google.errorprone:javac:9+181-r4173-1'
}
}
configurations {
compileClasspath {
resolutionStrategy.activateDependencyLocking()
}
annotationProcessor {
resolutionStrategy.activateDependencyLocking()
}
runtimeClasspath {
resolutionStrategy.activateDependencyLocking()
}
testCompileClasspath {
resolutionStrategy.activateDependencyLocking()
}
testAnnotationProcessor {
resolutionStrategy.activateDependencyLocking()
}
testRuntimeClasspath {
resolutionStrategy.activateDependencyLocking()
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
}
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
tasks.test {
testLogging.showStandardStreams = true
useJUnitPlatform()
testLogging {
events('passed', 'skipped', 'failed')
}
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
}
// maven
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = rootProject.name
from components.java
pom {
name = 'CommandUtility'
url = 'https://github.com/kuro46/CommandUtility'
}
}
}
repositories {
if (version.endsWith('SNAPSHOT')) {
mavenLocal()
} else {
maven {
def publishRootDir = project.hasProperty('commandutility.publish.rootdir')
? project.getProperty('commandutility.publish.rootdir').toString()
: buildDir.toString()
url = "$publishRootDir/repos/releases"
}
}
}
}
javadoc {
options.encoding = 'UTF-8'
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}