Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(PC): remove unused tasks for running headless server from source #4463

Merged
merged 4 commits into from
Feb 21, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions facades/PC/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ logger.info("PC VERSION: {}", version)
// Jenkins-Artifactory integration catches on to this as part of the Maven-type descriptor
group = "org.terasology.facades"

configurations {
register("serverModules") {
description = "for fetching modules for running a server"
isTransitive = false
}
}

dependencies {
implementation(project(":engine"))
implementation(group = "org.reflections", name = "reflections", version = "0.9.10")
Expand Down Expand Up @@ -105,37 +98,9 @@ tasks.register<RunTerasology>("permissiveNatives") {
systemProperty("java.library.path", rootProject.file(dirNatives + "/" + nativeSubdirectoryName()))
}

/******************************************
* Headless server
*/

apply(from="server.build.gradle")

// TODO: Seems to always be up to date so no modules get copied
tasks.register<Sync>("setupServerModules") {
description =
"""Parses "extraModules" - a comma-separated list of modules and puts them into $localServerDataPath"""

val extraModules: String? by project
extraModules?.let {
// Grab modules from Artifactory - cheats by declaring them as dependencies
it.splitToSequence(",").forEach {
logger.info("Extra module: {}", it)
dependencies {
"serverModules"(group = "org.terasology.modules", name = it, version = "+")
}
}
}

from(configurations.named("serverModules"))
into(File(rootProject.file(localServerDataPath), "modules"))
}

// TODO: Make a task to reset server / game data
tasks.register<RunTerasology>("server") {
description = "Starts a headless multiplayer server with data stored in [project-root]/$localServerDataPath"
dependsOn("setupServerConfig")
dependsOn("setupServerModules")
args("-headless", "-homedir=$localServerDataPath")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could add -overrideDefaultConfig=override.cfg here to match the headless run config for IntelliJ 👍

}

Expand Down Expand Up @@ -276,10 +241,6 @@ tasks.named<CreateStartScripts>("startScripts") {
}
}

// NOTE: If you build a distribution while you have modules, all the test dependencies are in here.
// They're "optional" in module.txt and gradle doesn't know how to tell which are runtime and which are
// test-only.

distributions {
main {
contents {
Expand Down
42 changes: 0 additions & 42 deletions facades/PC/server.build.gradle

This file was deleted.