Skip to content

Commit

Permalink
chore: Move from multi-version setup to single version, future releas…
Browse files Browse the repository at this point in the history
…es only target latest MC version
  • Loading branch information
aleksilassila committed Oct 29, 2024
1 parent 6c4a7fc commit ff7c319
Show file tree
Hide file tree
Showing 361 changed files with 200 additions and 16,236 deletions.
92 changes: 56 additions & 36 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,48 +1,68 @@
plugins {
id("java")
id("fabric-loom").version("1.6-SNAPSHOT")
id("maven-publish")
}

subprojects {
apply<JavaPlugin>()
//subprojects {
//apply<JavaPlugin>()

repositories {
mavenLocal()
mavenCentral()
}

java {
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
}
}
val minecraft_version: String by project
val yarn_mappings: String by project
val loader_version: String by project
val fabric_version: String by project
val malilib_version: String by project
val litematica_projectid: String by project
val litematica_fileid: String by project

val archives_base_name: String by project
val mod_version: String by project

val buildAll = tasks.create("buildAll") {
dependsOn(":v1_17:build")
dependsOn(":v1_18:build")
dependsOn(":v1_19:build")
dependsOn(":v1_19_3:build")
dependsOn(":v1_19_4:build")
// This isn't working.... you still have to run each build individually
tasks.findByName(":v1_19_3:build")?.mustRunAfter(":v1_19_4:build")
tasks.findByName(":v1_19:build")?.mustRunAfter(":v1_19_3:build")
tasks.findByName(":v1_18:build")?.mustRunAfter(":v1_19:build")
tasks.findByName(":v1_17:build")?.mustRunAfter(":v1_18:build")
java {
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
//}

repositories {
mavenLocal()
mavenCentral()
maven("https://masa.dy.fi/maven")
maven("https://www.cursemaven.com")
}

dependencies {
// implementation(project(":common"))
minecraft("com.mojang:minecraft:${minecraft_version}")
mappings("net.fabricmc:yarn:${yarn_mappings}:v2")

modImplementation("net.fabricmc:fabric-loader:${loader_version}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${fabric_version}")
modImplementation("fi.dy.masa.malilib:malilib-fabric-${malilib_version}")
modImplementation("curse.maven:litematica-${litematica_projectid}:${litematica_fileid}")
}

tasks.withType<ProcessResources> {
inputs.property("version", mod_version)

filesMatching("fabric.mod.json") {
expand(mapOf("version" to mod_version))
}
}

tasks.register("copyJar") {
// Specify that this task runs after the 'build' task
dependsOn("build")

// Specify the task's action
doLast {
println("Copying files...")
file("v1_19_4/build/libs/v1_19_4.jar").copyTo(
file("build/${archives_base_name}-1.19.4-${mod_version}.jar"),
true
)
file("v1_19_3/build/libs/v1_19_3.jar").copyTo(
file("build/${archives_base_name}-1.19.3-${mod_version}.jar"),
true
)
file("v1_19/build/libs/v1_19.jar").copyTo(file("build/${archives_base_name}-1.19-${mod_version}.jar"), true)
file("v1_18/build/libs/v1_18.jar").copyTo(file("build/${archives_base_name}-1.18-${mod_version}.jar"), true)
file("v1_17/build/libs/v1_17.jar").copyTo(file("build/${archives_base_name}-1.17-${mod_version}.jar"), true)
val destination = file("build/${archives_base_name}-${minecraft_version}-${mod_version}.jar")
file("build/libs/litematica-printer.jar").copyTo(destination, true)
println("Copied output to ${destination.absolutePath}")
}
}

tasks.build {
finalizedBy("copyJar")
}
17 changes: 14 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=false
org.gradle.jvmargs=-Xmx1G
#org.gradle.parallel=false
# Mod Properties
mod_version=3.2
mod_version=3.2.1
maven_group=net.fabricmc
archives_base_name=litematica-printer
# https://masa.dy.fi/maven/fi/dy/masa/malilib/
malilib_version=1.20.4:0.18.0
# https://www.curseforge.com/minecraft/mc-mods/litematica/files
litematica_fileid=4946471
litematica_projectid=308892
# Fabric Properties: https://fabricmc.net/develop/
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.3
#Fabric api
fabric_version=0.91.3+1.20.4
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 0 additions & 7 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,3 @@ pluginManagement {
gradlePluginPortal()
}
}
include 'v1_20_4'
//include 'v1_20'
//include 'v1_19_4'
//include 'v1_19_3'
//include 'v1_19'
//include 'v1_18'
//include 'v1_17'
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.aleksilassila.litematica.printer.v1_19;
package me.aleksilassila.litematica.printer;

import me.aleksilassila.litematica.printer.v1_19.actions.Action;
import me.aleksilassila.litematica.printer.v1_19.actions.PrepareAction;
import me.aleksilassila.litematica.printer.actions.Action;
import me.aleksilassila.litematica.printer.actions.PrepareAction;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.aleksilassila.litematica.printer.v1_19;
package me.aleksilassila.litematica.printer;

import net.minecraft.block.*;
import net.minecraft.item.Item;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.aleksilassila.litematica.printer.v1_19;
package me.aleksilassila.litematica.printer;

import com.google.common.collect.ImmutableList;
import fi.dy.masa.litematica.config.Configs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package me.aleksilassila.litematica.printer.v1_20;
package me.aleksilassila.litematica.printer;

import fi.dy.masa.litematica.data.DataManager;
import fi.dy.masa.litematica.util.RayTraceUtils;
import fi.dy.masa.litematica.world.SchematicWorldHandler;
import fi.dy.masa.litematica.world.WorldSchematic;
import me.aleksilassila.litematica.printer.v1_20.actions.Action;
import me.aleksilassila.litematica.printer.v1_20.guides.Guide;
import me.aleksilassila.litematica.printer.v1_20.guides.Guides;
import me.aleksilassila.litematica.printer.actions.Action;
import me.aleksilassila.litematica.printer.guides.Guide;
import me.aleksilassila.litematica.printer.guides.Guides;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.entity.player.PlayerAbilities;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.aleksilassila.litematica.printer.v1_17;
package me.aleksilassila.litematica.printer;

import fi.dy.masa.litematica.world.WorldSchematic;
import net.minecraft.block.BlockState;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.aleksilassila.litematica.printer.v1_20_4;
package me.aleksilassila.litematica.printer;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.aleksilassila.litematica.printer.v1_17.actions;
package me.aleksilassila.litematica.printer.actions;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.aleksilassila.litematica.printer.v1_19.actions;
package me.aleksilassila.litematica.printer.actions;

import me.aleksilassila.litematica.printer.v1_19.LitematicaMixinMod;
import me.aleksilassila.litematica.printer.v1_19.implementation.PrinterPlacementContext;
import me.aleksilassila.litematica.printer.LitematicaMixinMod;
import me.aleksilassila.litematica.printer.implementation.PrinterPlacementContext;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.util.Hand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.aleksilassila.litematica.printer.v1_19.actions;
package me.aleksilassila.litematica.printer.actions;

import me.aleksilassila.litematica.printer.v1_19.implementation.PrinterPlacementContext;
import me.aleksilassila.litematica.printer.implementation.PrinterPlacementContext;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.aleksilassila.litematica.printer.v1_19.actions;
package me.aleksilassila.litematica.printer.actions;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.aleksilassila.litematica.printer.v1_20.guides;
package me.aleksilassila.litematica.printer.guides;

import me.aleksilassila.litematica.printer.v1_20.SchematicBlockState;
import me.aleksilassila.litematica.printer.v1_20.actions.Action;
import me.aleksilassila.litematica.printer.v1_20.implementation.BlockHelperImpl;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import me.aleksilassila.litematica.printer.actions.Action;
import me.aleksilassila.litematica.printer.implementation.BlockHelperImpl;
import net.minecraft.block.BlockState;
import net.minecraft.block.CoralBlock;
import net.minecraft.client.network.ClientPlayerEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.aleksilassila.litematica.printer.v1_17.guides;
package me.aleksilassila.litematica.printer.guides;

import me.aleksilassila.litematica.printer.v1_17.SchematicBlockState;
import me.aleksilassila.litematica.printer.v1_17.guides.interaction.*;
import me.aleksilassila.litematica.printer.v1_17.guides.placement.*;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import me.aleksilassila.litematica.printer.guides.interaction.*;
import me.aleksilassila.litematica.printer.guides.placement.*;
import net.minecraft.block.*;
import net.minecraft.util.Pair;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.aleksilassila.litematica.printer.v1_19.guides;
package me.aleksilassila.litematica.printer.guides;

import me.aleksilassila.litematica.printer.v1_19.SchematicBlockState;
import me.aleksilassila.litematica.printer.v1_19.actions.Action;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import me.aleksilassila.litematica.printer.actions.Action;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.item.ItemStack;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.aleksilassila.litematica.printer.v1_20.guides.interaction;
package me.aleksilassila.litematica.printer.guides.interaction;

import me.aleksilassila.litematica.printer.v1_20.SchematicBlockState;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import net.minecraft.block.CampfireBlock;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.item.ItemStack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.aleksilassila.litematica.printer.v1_19.guides.interaction;
package me.aleksilassila.litematica.printer.guides.interaction;

import me.aleksilassila.litematica.printer.v1_19.SchematicBlockState;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.LeverBlock;
import net.minecraft.client.network.ClientPlayerEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.aleksilassila.litematica.printer.v1_19.guides.interaction;
package me.aleksilassila.litematica.printer.guides.interaction;

import me.aleksilassila.litematica.printer.v1_19.SchematicBlockState;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.aleksilassila.litematica.printer.v1_17.guides.interaction;
package me.aleksilassila.litematica.printer.guides.interaction;

import me.aleksilassila.litematica.printer.v1_17.SchematicBlockState;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import net.minecraft.block.Block;
import net.minecraft.block.FlowerPotBlock;
import net.minecraft.client.network.ClientPlayerEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package me.aleksilassila.litematica.printer.v1_17.guides.interaction;

import me.aleksilassila.litematica.printer.v1_17.implementation.PrinterPlacementContext;
import me.aleksilassila.litematica.printer.v1_17.SchematicBlockState;
import me.aleksilassila.litematica.printer.v1_17.actions.Action;
import me.aleksilassila.litematica.printer.v1_17.actions.PrepareAction;
import me.aleksilassila.litematica.printer.v1_17.actions.ReleaseShiftAction;
import me.aleksilassila.litematica.printer.v1_17.guides.Guide;
import me.aleksilassila.litematica.printer.v1_17.implementation.actions.InteractActionImpl;
package me.aleksilassila.litematica.printer.guides.interaction;

import me.aleksilassila.litematica.printer.implementation.PrinterPlacementContext;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import me.aleksilassila.litematica.printer.actions.Action;
import me.aleksilassila.litematica.printer.actions.PrepareAction;
import me.aleksilassila.litematica.printer.actions.ReleaseShiftAction;
import me.aleksilassila.litematica.printer.guides.Guide;
import me.aleksilassila.litematica.printer.implementation.actions.InteractActionImpl;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.hit.BlockHitResult;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.aleksilassila.litematica.printer.v1_17.guides.interaction;
package me.aleksilassila.litematica.printer.guides.interaction;

import me.aleksilassila.litematica.printer.v1_17.SchematicBlockState;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import net.minecraft.block.AbstractCandleBlock;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.item.ItemStack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.aleksilassila.litematica.printer.v1_17.guides.interaction;
package me.aleksilassila.litematica.printer.guides.interaction;

import me.aleksilassila.litematica.printer.v1_17.LitematicaMixinMod;
import me.aleksilassila.litematica.printer.v1_17.SchematicBlockState;
import me.aleksilassila.litematica.printer.v1_17.mixin.AxeItemAccessor;
import me.aleksilassila.litematica.printer.LitematicaMixinMod;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import me.aleksilassila.litematica.printer.mixin.AxeItemAccessor;
import net.minecraft.block.Block;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.item.Item;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.aleksilassila.litematica.printer.v1_19.guides.interaction;
package me.aleksilassila.litematica.printer.guides.interaction;

import me.aleksilassila.litematica.printer.v1_19.SchematicBlockState;
import me.aleksilassila.litematica.printer.v1_19.guides.placement.FarmlandGuide;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import me.aleksilassila.litematica.printer.guides.placement.FarmlandGuide;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.aleksilassila.litematica.printer.v1_20_4.guides.placement;
package me.aleksilassila.litematica.printer.guides.placement;

import me.aleksilassila.litematica.printer.v1_20_4.SchematicBlockState;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import net.minecraft.block.*;

public class BlockIndifferentGuesserGuide extends GuesserGuide {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.aleksilassila.litematica.printer.v1_20.guides.placement;
package me.aleksilassila.litematica.printer.guides.placement;

import me.aleksilassila.litematica.printer.v1_20.implementation.PrinterPlacementContext;
import me.aleksilassila.litematica.printer.v1_20.SchematicBlockState;
import me.aleksilassila.litematica.printer.v1_20.guides.Guide;
import me.aleksilassila.litematica.printer.implementation.PrinterPlacementContext;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import me.aleksilassila.litematica.printer.guides.Guide;
import net.minecraft.block.CandleBlock;
import net.minecraft.block.SeaPickleBlock;
import net.minecraft.block.SlabBlock;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.aleksilassila.litematica.printer.v1_19.guides.placement;
package me.aleksilassila.litematica.printer.guides.placement;

import me.aleksilassila.litematica.printer.v1_19.SchematicBlockState;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.ChestBlock;
import net.minecraft.block.enums.ChestType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.aleksilassila.litematica.printer.v1_18.guides.placement;
package me.aleksilassila.litematica.printer.guides.placement;

import me.aleksilassila.litematica.printer.v1_18.SchematicBlockState;
import me.aleksilassila.litematica.printer.SchematicBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.FallingBlock;
import net.minecraft.client.network.ClientPlayerEntity;
Expand Down
Loading

0 comments on commit ff7c319

Please sign in to comment.