a145ce6a96
- Updated SetupMinecraft task to use a Python script for setup. - Removed dependencies on the Ripper task and related classes. - Added new PythonTasks class to handle Python script execution. - Introduced new scripts for handling Minecraft server setup and HTTP requests. - Cleaned up unnecessary code and files related to the previous implementation.
56 lines
1.4 KiB
Groovy
56 lines
1.4 KiB
Groovy
import torchcs.tasks.SetupMinecraft
|
|
|
|
|
|
layout.buildDirectory = file('build/gradle')
|
|
|
|
subprojects {
|
|
layout.buildDirectory = rootProject.layout.projectDirectory.dir("build/gradle/${project.path.replace(':', '/').substring(1)}")
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
plugins.withId('java') {
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDirs = ['src']
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register('setupMinecraft', SetupMinecraft) {
|
|
group = 'torchcs'
|
|
description = 'Sets up the Minecraft server environment'
|
|
}
|
|
|
|
tasks.register('configureNativeRelease', Exec) {
|
|
commandLine 'cmake', '--preset', 'release'
|
|
}
|
|
|
|
tasks.register('buildNativeRelease', Exec) {
|
|
group = 'torchcs'
|
|
description = 'Configures and builds the native CMake targets (Release)'
|
|
commandLine 'cmake', '--build', '--preset', 'release', '--parallel'
|
|
dependsOn 'configureNativeRelease'
|
|
}
|
|
|
|
tasks.register('configureNativeDebug', Exec) {
|
|
commandLine 'cmake', '--preset', 'debug'
|
|
}
|
|
|
|
tasks.register('buildNativeDebug', Exec) {
|
|
group = 'torchcs'
|
|
description = 'Configures and builds the native CMake targets (Debug)'
|
|
commandLine 'cmake', '--build', '--preset', 'debug', '--parallel'
|
|
dependsOn 'configureNativeDebug'
|
|
}
|
|
|
|
tasks.register('cleanNative', Delete) {
|
|
group = 'torchcs'
|
|
description = 'Deletes the native CMake build directory'
|
|
delete 'build/cmake'
|
|
}
|