From 18b9962493aaff9f64d18b390e695dc5341b2181 Mon Sep 17 00:00:00 2001 From: radmanplays <95340057+radmanplays@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:42:41 +0330 Subject: [PATCH] Create build-desktopruntime.gradle --- build-desktopruntime.gradle | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 build-desktopruntime.gradle diff --git a/build-desktopruntime.gradle b/build-desktopruntime.gradle new file mode 100644 index 0000000..e02ad00 --- /dev/null +++ b/build-desktopruntime.gradle @@ -0,0 +1,38 @@ +//rename this file to build.gradle + + +plugins { + id 'java' + id 'eclipse' +} + +sourceSets { + main { + java { + srcDir 'src/main/java' + srcDir 'src/lwjgl/java' + } + } +} + +repositories { + mavenCentral() +} + +// https://stackoverflow.com/questions/21037879/add-library-to-gradle-build +dependencies { + implementation fileTree(dir: './desktopRuntime/eclipseProject/deps_fix/', include: '*.jar') +} + +//credit to MCPreborn +tasks.register('runclient', JavaExec) { + group = "ShadowClient" + description = "Runs the client" + classpath sourceSets.main.runtimeClasspath + if (System.getProperty("os.name").toLowerCase().contains("mac")) { + jvmArgs '-XstartOnFirstThread' + } + + workingDir "./desktopRuntime" + main 'net.lax1dude.eaglercraft.v1_8.internal.lwjgl.MainClass' +}