Skip to content

Commit

Permalink
slightly clean up buildscript
Browse files Browse the repository at this point in the history
  • Loading branch information
Mari023 committed Jul 7, 2024
1 parent 9b82cab commit d3aa975
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 121 deletions.
74 changes: 0 additions & 74 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,8 @@ plugins {
idea
}

val clothVersion: String by project
val ae2Version: String by project
val architecturyVersion: String by project
val runtimeItemlistMod: String by project
val jeiMinecraftVersion: String by project
val jeiVersion: String by project
val reiVersion: String by project
val emiVersion: String by project
val emiMinecraftVersion: String by project
val neoforgeVersion: String by project
val curiosVersion: String by project
val mavenGroup: String by project
val modID: String by project

Expand All @@ -38,73 +29,8 @@ val artifactVersion = version
java.toolchain.languageVersion = JavaLanguageVersion.of(21)

dependencies {
//implementation("top.theillusivec4.curios:curios-neoforge:${curiosVersion}")
implementation("appeng:appliedenergistics2:${ae2Version}")

compileOnly("me.shedaniel:RoughlyEnoughItems-neoforge:${reiVersion}")
compileOnly("mezz.jei:jei-${jeiMinecraftVersion}-neoforge:${jeiVersion}")
compileOnly("dev.emi:emi-neoforge:${emiVersion}+${emiMinecraftVersion}:api")

when (runtimeItemlistMod) {
"rei" -> {
runtimeOnly("me.shedaniel:RoughlyEnoughItems-neoforge:${reiVersion}")
runtimeOnly("dev.architectury:architectury-neoforge:${architecturyVersion}")
}

"jei" -> runtimeOnly("mezz.jei:jei-${jeiMinecraftVersion}-neoforge:${jeiVersion}")

"emi" -> {
runtimeOnly("dev.emi:emi-neoforge:${emiVersion}+${emiMinecraftVersion}")
}

"jemi" -> {
runtimeOnly("dev.emi:emi-neoforge:${emiVersion}+${emiMinecraftVersion}")
runtimeOnly("mezz.jei:jei-${jeiMinecraftVersion}-neoforge:${jeiVersion}")
}
}

implementation("com.google.code.findbugs:jsr305:3.0.2")

//testing
//runtimeOnly(fg.deobf("maven.modrinth:aeinfinitybooster:1.20.1-1.0.0+20"))
}

repositories {
mavenLocal()
mavenCentral()
maven {
url = uri("https://modmaven.dev/")
content {
includeGroup("appeng")
includeGroup("mezz.jei")
}
}
maven {
url = uri("https://maven.shedaniel.me/")
content {
includeGroup("me.shedaniel")
includeGroup("me.shedaniel.cloth")
includeGroup("dev.architectury")
}
}
maven {
url = uri("https://maven.terraformersmc.com/")
content {
includeGroup("dev.emi")
}
}
maven {
url = uri("https://maven.theillusivec4.top/")
content {
includeGroup("top.theillusivec4.curios")
}
}
maven {
url = uri("https://api.modrinth.com/maven")
content {
includeGroup("maven.modrinth")
}
}
}

tasks {
Expand Down
2 changes: 1 addition & 1 deletion api/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modID=ae2wtlib-api
modID=ae2wtlib_api
13 changes: 3 additions & 10 deletions api/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,23 @@ API for adding wireless terminals with easy integration with AE2wtlib.
'''
logoFile = "icon.png"

[[dependencies.ae2wtlib]]
[[dependencies.ae2wtlib_api]]
modId = "neoforge"
type="REQUIRED"
versionRange = "*"
ordering = "NONE"
side = "BOTH"

[[dependencies.ae2wtlib]]
[[dependencies.ae2wtlib_api]]
modId = "minecraft"
type="REQUIRED"
versionRange = "*"
ordering = "NONE"
side = "BOTH"

[[dependencies.ae2wtlib]]
[[dependencies.ae2wtlib_api]]
modId = "ae2"
type="REQUIRED"
versionRange = "[${ae2_version},20.0.0)"
ordering = "AFTER"
side = "BOTH"

[[dependencies.ae2wtlib]]
modId = "curios"
type="OPTIONAL"
versionRange = "*"
ordering = "AFTER"
side = "BOTH"
63 changes: 32 additions & 31 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ plugins {
idea
}

val clothVersion: String by project
val ae2Version: String by project
val architecturyVersion: String by project
val runtimeItemlistMod: String by project
Expand Down Expand Up @@ -70,40 +69,42 @@ dependencies {
//runtimeOnly(fg.deobf("maven.modrinth:aeinfinitybooster:1.20.1-1.0.0+20"))
}

repositories {
mavenLocal()
mavenCentral()
maven {
url = uri("https://modmaven.dev/")
content {
includeGroup("appeng")
includeGroup("mezz.jei")
allprojects {
repositories {
mavenLocal()
mavenCentral()
maven {
url = uri("https://modmaven.dev/")
content {
includeGroup("appeng")
includeGroup("mezz.jei")
}
}
}
maven {
url = uri("https://maven.shedaniel.me/")
content {
includeGroup("me.shedaniel")
includeGroup("me.shedaniel.cloth")
includeGroup("dev.architectury")
maven {
url = uri("https://maven.shedaniel.me/")
content {
includeGroup("me.shedaniel")
includeGroup("me.shedaniel.cloth")
includeGroup("dev.architectury")
}
}
}
maven {
url = uri("https://maven.terraformersmc.com/")
content {
includeGroup("dev.emi")
maven {
url = uri("https://maven.terraformersmc.com/")
content {
includeGroup("dev.emi")
}
}
}
maven {
url = uri("https://maven.theillusivec4.top/")
content {
includeGroup("top.theillusivec4.curios")
maven {
url = uri("https://maven.theillusivec4.top/")
content {
includeGroup("top.theillusivec4.curios")
}
}
}
maven {
url = uri("https://api.modrinth.com/maven")
content {
includeGroup("maven.modrinth")
maven {
url = uri("https://api.modrinth.com/maven")
content {
includeGroup("maven.modrinth")
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package de.mari_023.ae2wtlib.wut.select;

import java.awt.*;
import java.util.ArrayList;
import java.util.List;

Expand All @@ -13,8 +14,6 @@
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.ItemStack;

import me.shedaniel.math.Color;

import de.mari_023.ae2wtlib.api.registration.WTDefinition;

public class WUTSelectScreen extends Screen {
Expand All @@ -37,7 +36,7 @@ public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partia

for (int i = 0; i < terminals.size(); i++)
drawSegment(guiGraphics.pose(), i * angle, (i + 1) * angle, hWidth, hHeight, 100, 50,
Color.ofRGB(125, 125, 125),
new Color(125, 125, 125),
i == selected);

super.render(guiGraphics, mouseX, mouseY, partialTicks);
Expand All @@ -47,7 +46,7 @@ public static void drawSegment(PoseStack poseStack, int startingAngle, int endin
float centerY, int outerRadius, int innerRadius, Color color, boolean selected) {
if (selected) {
outerRadius += 10;
color = color.darker(2);
color = color.darker();
}

poseStack.pushPose();
Expand Down
9 changes: 8 additions & 1 deletion src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ config="ae2wtlib.mixins.json"
[[dependencies.ae2wtlib]]
modId = "ae2wtlib_api"
type="REQUIRED"
versionRange = "${version}"
versionRange = "[${version}]"
ordering = "AFTER"
side = "BOTH"

Expand All @@ -30,3 +30,10 @@ type="REQUIRED"
versionRange = "[${ae2_version},20.0.0)"
ordering = "AFTER"
side = "BOTH"

[[dependencies.ae2wtlib]]
modId = "curios"
type="OPTIONAL"
versionRange = "*"
ordering = "AFTER"
side = "BOTH"

0 comments on commit d3aa975

Please sign in to comment.