forked from lax1dude/eaglerxserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
72 lines (60 loc) · 1.68 KB
/
build.gradle
File metadata and controls
72 lines (60 loc) · 1.68 KB
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
def localLibsFolder = uri(file("gradle/local-libs"));
subprojects {
apply plugin: "eclipse"
repositories {
mavenCentral()
maven {
name = "papermc"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
maven {
name = "spigotmc"
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}
maven {
name = "codemc"
url = uri("https://repo.codemc.org/repository/maven-public/")
}
maven {
name = "sonatype-oss"
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
maven {
name = "eagler-local"
url = localLibsFolder
}
}
group = providers.gradleProperty("eaglerxserver.group").get()
version = providers.gradleProperty("eaglerxserver.version").get()
plugins.withId("java") {
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
// https://github.com/gradle/gradle/issues/32284
sourceSets.configureEach {
def eclipseCompileClasspath = configurations.resolvable(getTaskName(null, "eclipseCompileClasspath")) {
def compileClasspath = configurations.getByName(getCompileClasspathConfigurationName())
extendsFrom(compileClasspath)
attributes {
compileClasspath.attributes.keySet().each { key ->
attribute((Attribute) key, compileClasspath.attributes.getAttribute(key))
}
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements, LibraryElements.JAR))
}
}
eclipse {
classpath {
plusConfigurations.add(eclipseCompileClasspath.get())
}
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
tasks.withType(Javadoc).configureEach {
options.encoding = "UTF-8"
}
}