mirror of
https://github.com/lax1dude/eaglerxserver
synced 2025-06-05 15:51:59 -09:00
73 lines
1.7 KiB
Groovy
73 lines
1.7 KiB
Groovy
|
|
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"
|
|
}
|
|
|
|
}
|