Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
24 changes: 12 additions & 12 deletions buildSrc/src/main/groovy/multiloader-loader.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,6 @@ publishMods {
minecraftVersions.add(minecraft_version)
}*/

github {
repository = "ryanhcode/sable"
accessToken = providers.environmentVariable("GITHUB_TOKEN")
tagName = "mc$minecraft_version-$project.version-$project.name"
commitish = "main"

file.unset()
file.unsetConvention()

allowEmptyFiles = true
}

modrinth {
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
projectId = "T9PomCSv"
Expand All @@ -91,4 +79,16 @@ publishMods {

embeds("veil")
}

github {
repository = "ryanhcode/sable"
accessToken = providers.environmentVariable("GITHUB_TOKEN")
tagName = "mc$minecraft_version-$project.version-$project.name"
commitish = "main"

file.unset()
file.unsetConvention()

allowEmptyFiles = true
}
}
13 changes: 11 additions & 2 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import org.apache.tools.ant.taskdefs.condition.Os
import org.gradle.api.internal.tasks.userinput.UserInputHandler

plugins {
id 'multiloader-common'
Expand Down Expand Up @@ -66,6 +65,14 @@ tasks.register('compileRustMac', Exec) {
dependsOn createContainersDirectory
}

tasks.register('compileRustLinuxAArch64', Exec) {
group = 'rust'
workingDir rustProjectDir
commandLine dockerCommand
args 'cargo', 'zigbuild', '--release', '--target', 'aarch64-unknown-linux-gnu.2.17'
dependsOn createContainersDirectory
}

tasks.register('compileRustLinux', Exec) {
group = 'rust'
workingDir rustProjectDir
Expand All @@ -86,7 +93,7 @@ tasks.register('buildRustNatives') {
group = 'build'
description = 'Compiles all Rust natives and moves them to resources.'

dependsOn compileRustMac, compileRustLinux, compileRustWindows
dependsOn compileRustMac, compileRustLinux, compileRustLinuxAArch64, compileRustWindows
finalizedBy copyRustNatives
}

Expand All @@ -99,8 +106,10 @@ tasks.register('copyRustNatives', Copy) {
def moves = [
[src: "target/aarch64-apple-darwin/release/libsable_rapier.dylib", dest: "sable_rapier_aarch64_macos.dylib"],
[src: "target/x86_64-unknown-linux-gnu/release/libsable_rapier.so", dest: "sable_rapier_x86_64_linux.so"],
[src: "target/aarch64-unknown-linux-gnu/release/libsable_rapier.so", dest: "sable_rapier_aarch64_linux.so"],
[src: "target/x86_64-pc-windows-gnu/release/sable_rapier.dll", dest: "sable_rapier_x86_64_windows.dll"]
]

moves.forEach { map ->
from(file("$rustProjectDir/${map.src}")) {
rename { map.dest }
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions common/src/main/rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ RUN rustup default $RUST_VERSION
RUN rustup target add x86_64-pc-windows-gnu
RUN rustup target add aarch64-apple-darwin
RUN rustup target add x86_64-unknown-linux-gnu
RUN rustup target add aarch64-unknown-linux-gnu

WORKDIR /
2 changes: 1 addition & 1 deletion common/src/main/rust/rapier/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[target.x86_64-pc-windows-gnu]
rustflags = ["-C", "link-arg=/TIMESTAMP:0"]
rustflags = ["-C", "link-arg=-Wl,-Brepro"]
Loading