Update build and urls
This commit is contained in:
parent
8003833012
commit
8e91c261e6
6 changed files with 60 additions and 27 deletions
66
build.gradle
66
build.gradle
|
@ -1,9 +1,5 @@
|
|||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* This generated file contains a sample Java application project to get you started.
|
||||
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.5/userguide/building_java_projects.html in the Gradle documentation.
|
||||
*/
|
||||
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
|
||||
plugins {
|
||||
// Apply the application plugin to add support for building a CLI application in Java.
|
||||
|
@ -12,6 +8,31 @@ plugins {
|
|||
id 'java'
|
||||
}
|
||||
|
||||
project.ext.lwjglVersion = "2.9.3"
|
||||
project.ext.set('nativeLibsDir', "$buildDir/libs/natives")
|
||||
|
||||
|
||||
switch (OperatingSystem.current()) {
|
||||
case OperatingSystem.LINUX:
|
||||
project.ext.lwjglNatives = "natives-linux"
|
||||
def osArch = System.getProperty("os.arch")
|
||||
if (osArch.startsWith("arm") || osArch.startsWith("aarch64")) {
|
||||
project.ext.lwjglNatives += osArch.contains("64") || osArch.startsWith("armv8") ? "-arm64" : "-arm32"
|
||||
} else if (osArch.startsWith("ppc")) {
|
||||
project.ext.lwjglNatives += "-ppc64le"
|
||||
} else if (osArch.startsWith("riscv")) {
|
||||
project.ext.lwjglNatives += "-riscv64"
|
||||
}
|
||||
break
|
||||
case OperatingSystem.MAC_OS:
|
||||
project.ext.lwjglNatives = "natives-macos"
|
||||
break
|
||||
case OperatingSystem.WINDOWS:
|
||||
project.ext.lwjglNatives = "natives-windows"
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
configurations {
|
||||
provided
|
||||
natives
|
||||
|
@ -27,22 +48,25 @@ configurations {
|
|||
repositories {
|
||||
// Use Maven Central for resolving dependencies.
|
||||
maven {
|
||||
url = "https://maven.zontreck.dev/repository/internal"
|
||||
url = "https://maven.zontreck.com/repository/internal"
|
||||
name = "Aria's Creations Caches"
|
||||
}
|
||||
maven {
|
||||
url = "https://maven.zontreck.dev/repository/zontreck"
|
||||
url = "https://maven.zontreck.com/repository/zontreck"
|
||||
name = "Aria's Creations"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
provided ("net.java.jinput:jinput-platform:2.0.7")
|
||||
provided platform("net.java.jinput:jinput-platform:2.0.7")
|
||||
provided ("net.java.jutils:jutils:1.0.0")
|
||||
provided ("org.lwjgl.lwjgl:lwjgl:2.9.3")
|
||||
provided ("org.lwjgl.lwjgl:lwjgl_util:2.9.3")
|
||||
provided ("org.lwjgl.lwjgl:lwjgl-platform:2.9.3")
|
||||
provided ("dev.zontreck:LibAC:1.4.15")
|
||||
|
||||
|
||||
provided "org.lwjgl.lwjgl:lwjgl:$lwjglVersion"
|
||||
provided "org.lwjgl.lwjgl:lwjgl_util:$lwjglVersion"
|
||||
provided platform("org.lwjgl.lwjgl:lwjgl-platform:$lwjglVersion-$lwjglNatives")
|
||||
provided "dev.zontreck:LibAC:1.5.11"
|
||||
|
||||
}
|
||||
|
||||
// Apply a specific Java toolchain to ease working on different environments.
|
||||
|
@ -61,9 +85,10 @@ jar {
|
|||
manifest {
|
||||
attributes (
|
||||
'Main-Class': application.mainClass,
|
||||
'Multi-Release': 'true',
|
||||
'Class-Path': configurations.provided.files.collect{"lib/${it.name}"}.join(' ')
|
||||
'Multi-Release': 'true'
|
||||
)
|
||||
}from {
|
||||
configurations.provided.collect { it.isDirectory() ? it : zipTree(it)}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,7 +99,7 @@ task copyToLib(type: Copy) {
|
|||
}
|
||||
|
||||
task copyNatives(type: Copy) {
|
||||
into "${buildDir}/libs/natives"
|
||||
into project.nativeLibsDir
|
||||
duplicatesStrategy = "exclude"
|
||||
configurations.provided.asFileTree.each {
|
||||
if(it.isFile())
|
||||
|
@ -87,13 +112,13 @@ task jarjar(type: Jar) {
|
|||
'Main-Class': application.mainClass,
|
||||
'Multi-Release': 'true'
|
||||
)
|
||||
}from {
|
||||
configurations.provided.collect { it.isDirectory() ? it : zipTree(it)}
|
||||
}
|
||||
archiveClassifier = "AIO"
|
||||
duplicatesStrategy = "exclude"
|
||||
from { configurations.provided.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||
|
||||
exclude 'META-INF/*'
|
||||
exclude 'META-INF/*'
|
||||
exclude 'META-INF/*'
|
||||
|
||||
with jar
|
||||
|
@ -101,6 +126,11 @@ task jarjar(type: Jar) {
|
|||
with copyNatives
|
||||
}
|
||||
|
||||
|
||||
run {
|
||||
jvmArgs("-Djava.library.path=./natives")
|
||||
}
|
||||
|
||||
jar.finalizedBy(jarjar)
|
||||
jar.finalizedBy(copyToLib)
|
||||
jar.finalizedBy(copyNatives)
|
8
run.sh
Normal file
8
run.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
./gradlew build
|
||||
pushd build/libs
|
||||
|
||||
java -Djava.library.path=natives -jar Minecraft-AIO.jar
|
||||
|
||||
popd
|
|
@ -1,10 +1,3 @@
|
|||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* The settings file is used to specify which projects to include in your build.
|
||||
* For more detailed information on multi-project builds, please refer to https://docs.gradle.org/8.5/userguide/building_swift_projects.html in the Gradle documentation.
|
||||
*/
|
||||
|
||||
plugins {
|
||||
// Apply the foojay-resolver plugin to allow automatic download of JDKs
|
||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
|
||||
|
|
|
@ -9,6 +9,8 @@ import java.io.File;
|
|||
import java.io.FileOutputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.time.Instant;
|
||||
import java.util.Random;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class ThreadDownloadResources extends Thread {
|
|||
public final void run() {
|
||||
try {
|
||||
ArrayList var1 = new ArrayList();
|
||||
URL var2 = new URL("https://api.zontreck.dev/zni/yggdrasil/resources/");
|
||||
URL var2 = new URL("https://api.zontreck.com/crafting/yggdrasil/resources/");
|
||||
BufferedReader var3 = new BufferedReader(new InputStreamReader(var2.openStream()));
|
||||
String var4 = null;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ final class ThreadDownloadSkin extends Thread {
|
|||
HttpURLConnection var1 = null;
|
||||
|
||||
try {
|
||||
var1 = (HttpURLConnection)(new URL("https://api.zontreck.dev/zni/yggdrasil/skin/" + this.mc.session.username + ".png")).openConnection();
|
||||
var1 = (HttpURLConnection)(new URL("https://git.zontreck.com/zontreck/zontreck/raw/branch/master/" + this.mc.session.username + ".png")).openConnection();
|
||||
var1.setDoInput(true);
|
||||
var1.setDoOutput(false);
|
||||
var1.connect();
|
||||
|
|
Loading…
Reference in a new issue