-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (80 loc) · 1.61 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
plugins {
id 'java'
id 'maven-publish'
}
defaultTasks 'build'
group 'org.hurricanegames'
version '1.6'
import java.nio.file.Path
import java.nio.file.Paths
import java.nio.file.Files
Path projectDirectoryPath = projectDir.toPath().toAbsolutePath()
sourceCompatibility = JavaVersion.VERSION_16
sourceSets {
main {
java {
srcDirs = ['src']
}
resources {
srcDirs = ['resources']
}
}
test {
java {
srcDirs = ['tests']
}
}
}
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
url 'https://hub.spigotmc.org/nexus/content/repositories/public/'
}
maven {
url 'https://papermc.io/repo/repository/maven-public/'
}
}
configurations {
runtimeDependencies
compileOnly {
extendsFrom runtimeDependencies
}
testImplementation {
extendsFrom runtimeDependencies
}
}
dependencies {
runtimeDependencies group: 'io.papermc.paper', name: 'paper-api', version: '1.17.1-R0.1-SNAPSHOT'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.2.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.2.0'
}
compileJava {
options.encoding = 'UTF-8'
options.incremental = false
}
test {
Path workingDirectoryPath = projectDirectoryPath.resolve('testsRun');
doFirst {
Files.createDirectories(workingDirectoryPath)
}
useJUnitPlatform()
workingDir = workingDirectoryPath;
}
jar {
from sourceSets.main.java.srcDirs
}
compileJava.finalizedBy(test)
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
publishing {
publications {
release(MavenPublication) {
from components.java
artifacts = [jar]
}
}
}