Building works now

This commit is contained in:
FlorianMichael 2023-10-20 10:46:47 +02:00
parent 5e40ef4111
commit 967930ef64
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
3 changed files with 36 additions and 40 deletions

View File

@ -1,4 +1,4 @@
name: ViaForge build
name: ViaForge CI
on: [pull_request, push, workflow_dispatch]
jobs:
@ -21,10 +21,10 @@ jobs:
- name: Make Gradle wrapper runnable on Unix
run: chmod +x ./gradlew
- name: Build
run: ./gradlew build
run: ./gradlew shadowJar
- name: Upload Build Artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '8' }}
uses: actions/upload-artifact@v3
with:
name: ViaForge-1.12.2
path: mc1122/build/libs/
path: viaforge-mc112/build/libs/

View File

@ -6,13 +6,13 @@ plugins {
subprojects {
apply plugin: "com.github.johnrengelman.shadow"
archivesBaseName = "ViaForge-" + project.maven_name
archivesBaseName = project.maven_name
version = maven_version + project.mc_version
group = maven_group
configurations {
library
implementation.extendsFrom(library)
include
implementation.extendsFrom(include)
}
repositories {
@ -25,21 +25,30 @@ subprojects {
}
dependencies {
library "com.viaversion:viaversion:${project.viaversion_version}"
library "com.viaversion:viabackwards:${project.viabackwards_version}"
library "com.viaversion:viarewind-universal:${project.viarewind_version}"
library "org.yaml:snakeyaml:${project.snake_yml_version}"
include "com.viaversion:viaversion:${project.viaversion_version}"
include "com.viaversion:viabackwards:${project.viabackwards_version}"
include "com.viaversion:viarewind-universal:${project.viarewind_version}"
include "org.yaml:snakeyaml:${project.snake_yml_version}"
library "net.raphimc:ViaLoader:${project.vialoader_version}"
include "net.raphimc:ViaLoader:${project.vialoader_version}"
}
shadowJar {
archiveFileName = jar.archiveFileName
compileJava.options.encoding = "UTF-8"
exclude "native-binaries/*"
configurations = [project.configurations.compileClasspath]
jar {
manifest.attributes(
"Specification-Title": "viaforge",
"Specification-Vendor": "viaforge",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": "${archiveVersion}",
"Implementation-Vendor" :"viaforge",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd"-"HH:mm:ssZ"),
"TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
"TweakOrder": "0",
"FMLCorePluginContainsFMLMod": "true",
"FMLCorePlugin": "de.florianmichael.viaforge.mixin.MixinLoader",
"MixinConfigs": "mixins.${maven_name}.json",
"ForceLoadAsMod": "true"
)
enabled = false
}
jar.dependsOn("shadowJar")
}

View File

@ -38,8 +38,8 @@ sourceSets.main.resources {
dependencies {
minecraft "net.minecraftforge:forge:1.12.2-14.23.5.2859"
library "org.spongepowered:mixin:${mixin_version}"
library "org.slf4j:slf4j-api:${project.slf4j_version}"
include "org.spongepowered:mixin:${mixin_version}"
include "org.slf4j:slf4j-api:${project.slf4j_version}"
annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
}
@ -48,26 +48,13 @@ mixin {
add sourceSets.main, "mixins.${maven_name}.refmap.json"
}
jar {
manifest.attributes(
"Specification-Title": "viaforge",
"Specification-Vendor": "viaforge",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": "${archiveVersion}",
"Implementation-Vendor" :"viaforge",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd"-"HH:mm:ssZ"),
"TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
"TweakOrder": "0",
"FMLCorePluginContainsFMLMod": "true",
"FMLCorePlugin": "de.florianmichael.viaforge.mixin.MixinLoader",
"MixinConfigs": "mixins.${maven_name}.json",
"ForceLoadAsMod": "true"
)
enabled = false
shadowJar {
archiveFileName = jar.archiveFileName
configurations = [project.configurations.include]
duplicatesStrategy DuplicatesStrategy.EXCLUDE
}
reobf {
shadowJar {}
shadowJar {
}
}