mirror of
https://github.com/ViaVersion/ViaForge.git
synced 2024-11-21 11:55:13 +01:00
Abstract build scripts
This commit is contained in:
parent
0641355db6
commit
4b51ddf542
34
build.gradle
34
build.gradle
@ -1,35 +1,3 @@
|
||||
plugins {
|
||||
id "java"
|
||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: "com.github.johnrengelman.shadow"
|
||||
|
||||
archivesBaseName = project.maven_name
|
||||
version = maven_version + project.mc_version
|
||||
group = maven_group
|
||||
|
||||
configurations {
|
||||
include
|
||||
implementation.extendsFrom(include)
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = "https://repo.spongepowered.org/repository/maven-public"
|
||||
}
|
||||
maven {
|
||||
url = "https://repo.viaversion.com"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
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}"
|
||||
|
||||
include "net.raphimc:ViaLoader:${project.vialoader_version}"
|
||||
}
|
||||
id "base"
|
||||
}
|
||||
|
22
buildSrc/build.gradle
Normal file
22
buildSrc/build.gradle
Normal file
@ -0,0 +1,22 @@
|
||||
plugins {
|
||||
id "groovy-gradle-plugin"
|
||||
}
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
maven {
|
||||
url = "https://repo.spongepowered.org/repository/maven-public/"
|
||||
}
|
||||
maven {
|
||||
url = "https://jitpack.io/"
|
||||
}
|
||||
maven {
|
||||
url = "https://files.minecraftforge.net/maven"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "com.github.johnrengelman:shadow:7.1.2"
|
||||
implementation "net.minecraftforge.gradle:ForgeGradle:5.1.+"
|
||||
implementation "org.spongepowered:mixingradle:0.7-SNAPSHOT"
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
plugins {
|
||||
id "java-library"
|
||||
id "com.github.johnrengelman.shadow"
|
||||
}
|
||||
|
||||
archivesBaseName = project.maven_name
|
||||
version = maven_version + project.mc_version
|
||||
group = maven_group
|
||||
|
||||
compileJava.options.encoding = "UTF-8"
|
||||
|
||||
configurations {
|
||||
include
|
||||
implementation.extendsFrom(include)
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = "https://repo.spongepowered.org/repository/maven-public"
|
||||
}
|
||||
maven {
|
||||
url = "https://repo.viaversion.com"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
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}"
|
||||
|
||||
include "net.raphimc:ViaLoader:${project.vialoader_version}"
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
plugins {
|
||||
id "net.minecraftforge.gradle"
|
||||
id "org.spongepowered.mixin"
|
||||
}
|
||||
|
||||
minecraft {
|
||||
runs {
|
||||
client {
|
||||
workingDirectory project.file("run")
|
||||
|
||||
property 'forge.logging.markers', 'REGISTRIES'
|
||||
property "forge.logging.console.level", "debug"
|
||||
|
||||
// mixin
|
||||
property 'mixin.debug.export', 'true'
|
||||
property "mixin.hotSwap", "true"
|
||||
property "fml.coreMods.load", "de.florianmichael.viaforge.mixin.MixinLoader"
|
||||
args '-mixin.config=' + 'mixins.' + project.getProperty('maven_name') + '.json'
|
||||
|
||||
mods {
|
||||
"ViaForge" {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.main.resources {
|
||||
srcDir "src/generated/resources"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
include "org.spongepowered:mixin:${mixin_version}"
|
||||
include "org.slf4j:slf4j-api:${project.slf4j_version}"
|
||||
|
||||
annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
|
||||
}
|
||||
|
||||
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",
|
||||
"MixinConfigs": "mixins.${maven_name}.json",
|
||||
"ForceLoadAsMod": "true"
|
||||
)
|
||||
enabled = false
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveFileName = jar.archiveFileName
|
||||
configurations = [project.configurations.include]
|
||||
duplicatesStrategy DuplicatesStrategy.EXCLUDE
|
||||
|
||||
exclude("META-INF/maven/**")
|
||||
exclude("META-INF/services/**")
|
||||
exclude("META-INF/versions/**")
|
||||
}
|
||||
|
||||
reobf {
|
||||
shadowJar {}
|
||||
}
|
||||
|
||||
jar.dependsOn("shadowJar")
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
@ -7,11 +7,17 @@ pluginManagement {
|
||||
maven { url = "https://repo.spongepowered.org/repository/maven-public/" }
|
||||
maven { url = "https://jitpack.io/" }
|
||||
maven { url = "https://files.minecraftforge.net/maven" }
|
||||
maven { url = "https://plugins.gradle.org/m2" }
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||
id "net.minecraftforge.gradle" version "5.+"
|
||||
id "org.spongepowered.mixin" version "0.7-SNAPSHOT"
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "ViaForge"
|
||||
include "viaforge-mc112"
|
||||
include 'viaforge-mc116'
|
||||
include "viaforge-mc116"
|
||||
include "viaforge-mc117"
|
||||
|
||||
|
@ -1,79 +1,12 @@
|
||||
plugins {
|
||||
id "net.minecraftforge.gradle" version "5.+"
|
||||
id "org.spongepowered.mixin" version "0.7-SNAPSHOT"
|
||||
id "com.viaversion.base-conventions"
|
||||
id "com.viaversion.forge-conventions"
|
||||
}
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
||||
compileJava.options.encoding = "UTF-8"
|
||||
|
||||
minecraft {
|
||||
mappings channel: "stable", version: "39-1.12"
|
||||
|
||||
runs {
|
||||
client {
|
||||
workingDirectory project.file("run")
|
||||
|
||||
property 'forge.logging.markers', 'REGISTRIES'
|
||||
property "forge.logging.console.level", "debug"
|
||||
|
||||
// mixin
|
||||
property 'mixin.debug.export', 'true'
|
||||
property "mixin.hotSwap", "true"
|
||||
property "fml.coreMods.load", "de.florianmichael.viaforge.mixin.MixinLoader"
|
||||
args '-mixin.config=' + 'mixins.' + project.getProperty('maven_name') + '.json'
|
||||
|
||||
mods {
|
||||
"ViaForge" {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.main.resources {
|
||||
srcDir "src/generated/resources"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraftforge:forge:1.12.2-14.23.5.2860"
|
||||
|
||||
include "org.spongepowered:mixin:${mixin_version}"
|
||||
include "org.slf4j:slf4j-api:${project.slf4j_version}"
|
||||
|
||||
annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
|
||||
}
|
||||
|
||||
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 {
|
||||
}
|
||||
}
|
||||
|
@ -1,82 +1,12 @@
|
||||
plugins {
|
||||
id "net.minecraftforge.gradle" version "5.+"
|
||||
id "org.spongepowered.mixin" version "0.7-SNAPSHOT"
|
||||
id "com.viaversion.base-conventions"
|
||||
id "com.viaversion.forge-conventions"
|
||||
}
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
||||
compileJava.options.encoding = "UTF-8"
|
||||
|
||||
minecraft {
|
||||
mappings channel: "official", version: "1.16.5"
|
||||
|
||||
runs {
|
||||
client {
|
||||
workingDirectory project.file("run")
|
||||
|
||||
property 'forge.logging.markers', 'REGISTRIES'
|
||||
property "forge.logging.console.level", "debug"
|
||||
|
||||
// mixin
|
||||
property 'mixin.debug.export', 'true'
|
||||
property "mixin.hotSwap", "true"
|
||||
property "fml.coreMods.load", "de.florianmichael.viaforge.mixin.MixinLoader"
|
||||
args '-mixin.config=' + 'mixins.' + project.getProperty('maven_name') + '.json'
|
||||
|
||||
mods {
|
||||
"ViaForge" {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.main.resources {
|
||||
srcDir "src/generated/resources"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraftforge:forge:1.16.5-36.2.39"
|
||||
|
||||
include "org.spongepowered:mixin:${mixin_version}"
|
||||
include "org.slf4j:slf4j-api:${project.slf4j_version}"
|
||||
|
||||
annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
|
||||
}
|
||||
|
||||
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",
|
||||
"MixinConfigs": "mixins.${maven_name}.json",
|
||||
"ForceLoadAsMod": "true"
|
||||
)
|
||||
enabled = false
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveFileName = jar.archiveFileName
|
||||
configurations = [project.configurations.include]
|
||||
duplicatesStrategy DuplicatesStrategy.EXCLUDE
|
||||
|
||||
exclude("META-INF/maven/**")
|
||||
exclude("META-INF/services/**")
|
||||
exclude("META-INF/versions/**")
|
||||
}
|
||||
|
||||
reobf {
|
||||
shadowJar {}
|
||||
}
|
||||
|
||||
jar.dependsOn("shadowJar")
|
||||
|
14
viaforge-mc117/build.gradle
Normal file
14
viaforge-mc117/build.gradle
Normal file
@ -0,0 +1,14 @@
|
||||
plugins {
|
||||
id "com.viaversion.base-conventions"
|
||||
id "com.viaversion.forge-conventions"
|
||||
}
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
|
||||
minecraft {
|
||||
mappings channel: "official", version: "1.17.1"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraftforge:forge:1.17.1-37.1.1"
|
||||
}
|
2
viaforge-mc117/gradle.properties
Normal file
2
viaforge-mc117/gradle.properties
Normal file
@ -0,0 +1,2 @@
|
||||
maven_name=viaforge-mc117
|
||||
mc_version=1.17.1
|
Loading…
Reference in New Issue
Block a user