Trying to fix report discord task #23
@ -1,22 +1,26 @@
|
||||
package fr.altarik.toolbox.task;
|
||||
package fr.altarik.toolbox.task.server;
|
||||
|
||||
import fr.altarik.toolbox.task.PeriodicTaskI;
|
||||
import fr.altarik.toolbox.task.TaskI;
|
||||
import fr.altarik.toolbox.task.async.AsyncPeriodicTasks;
|
||||
import fr.altarik.toolbox.task.async.AsyncTaskI;
|
||||
import fr.altarik.toolbox.task.async.AsyncTasks;
|
||||
import fr.altarik.toolbox.task.sync.PeriodicSyncTask;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.api.DedicatedServerModInitializer;
|
||||
|
||||
public class Task implements ModInitializer {
|
||||
public class DedicatedServerTask implements DedicatedServerModInitializer {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final TaskI asyncWorkers = AsyncTasks.initialize();
|
||||
@SuppressWarnings("unused")
|
||||
public final PeriodicTaskI periodicSyncTask = PeriodicSyncTask.initialize();
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final AsyncTaskI asyncTasks = AsyncTasks.initialize();
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final PeriodicTaskI periodicAsyncTask = AsyncPeriodicTasks.initialize();
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
public void onInitializeServer() {
|
||||
/* try {
|
||||
asyncWorkers.addTask(new AltarikRunnable() {
|
||||
@Override
|
||||
@ -47,6 +51,7 @@ public class Task implements ModInitializer {
|
||||
} */
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public TaskI getAsyncWorkers() {
|
||||
return asyncWorkers;
|
||||
}
|
@ -17,8 +17,8 @@
|
||||
"icon": "assets/tasks/icon.png",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"fr.altarik.toolbox.task.Task"
|
||||
"server": [
|
||||
"fr.altarik.toolbox.task.server.DedicatedServerTask"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
|
18
build.gradle
18
build.gradle
@ -3,7 +3,10 @@ plugins {
|
||||
}
|
||||
|
||||
Properties local = new Properties()
|
||||
local.load(new FileInputStream(rootProject.file("local.properties")))
|
||||
try {
|
||||
local.load(new FileInputStream(rootProject.file("local.properties")))
|
||||
} catch (IOException ignored) {}
|
||||
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'maven-publish'
|
||||
@ -42,8 +45,8 @@ allprojects {
|
||||
name 'altarik'
|
||||
url 'https://repo.altarik.fr/'.concat(project.version.endsWith('SNAPSHOT') ? 'snapshots/' : 'releases/')
|
||||
credentials {
|
||||
username = System.getProperty("REPO_USERNAME", local.getProperty("repo_username"))
|
||||
password = System.getProperty("REPO_PASSWORD", local.getProperty("repo_password"))
|
||||
username = getEnv("REPO_USERNAME", local.getProperty("repo_username"))
|
||||
password = getEnv("REPO_PASSWORD", local.getProperty("repo_password"))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -98,6 +101,15 @@ dependencies {
|
||||
implementation subprojects.collect { project -> project }
|
||||
}
|
||||
|
||||
static def getEnv(String envName, String defaultValue) {
|
||||
String r = System.getenv(envName)
|
||||
if(r != null) {
|
||||
return r
|
||||
} else {
|
||||
return defaultValue
|
||||
}
|
||||
}
|
||||
|
||||
/*jar {
|
||||
dependsOn subprojects.jar
|
||||
subprojects.each { project ->
|
||||
|
@ -1,5 +1,5 @@
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
|
||||
fabric.loom.multiProjectOptimisation=true
|
||||
|
||||
junit_version=5.9.0
|
||||
minecraft_version=1.19.3
|
||||
@ -8,5 +8,4 @@ loader_version=0.14.14
|
||||
fabric_version=0.75.1+1.19.3
|
||||
|
||||
maven_group=fr.altarik.toolbox
|
||||
maven_version=4.3.0-SNAPSHOT
|
||||
repo_username=Altarik
|
||||
maven_version=4.3.1-SNAPSHOT
|
||||
|
Loading…
Reference in New Issue
Block a user