Skip to content

Commit 3d977be

Browse files
committed
Merge branch 'dev-1.18' into dev-1.19-antimatter-port-test
2 parents b83a61a + 5a162d4 commit 3d977be

File tree

22 files changed

+170
-821
lines changed

22 files changed

+170
-821
lines changed

.github/workflows/nightly.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name: TesseractAPI Nightly
99
on:
1010
push:
1111
branches:
12-
- 'dev**'
12+
- '*'
1313
pull_request:
1414
branches:
1515
- 'dev**'
@@ -31,25 +31,25 @@ jobs:
3131
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
3232
settings-path: ${{ github.workspace }} # location for the settings.xml file
3333
- name: Setup Gradle Dependencies Cache
34-
uses: actions/cache@v2
34+
uses: actions/cache@v4
3535
with:
3636
path: ~/.gradle/caches
3737
~/.gradle/wrapper
38-
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle','**/gradle/wrapper/gradle-wrapper.properties','**/*.properties') }}
38+
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.properties') }}
3939
- name: Build with Gradle
4040
run: ./gradlew build --stacktrace
4141
# The USERNAME and TOKEN need to correspond to the credential environment variables used in
4242
# the publishing section of your build.gradle
4343
- name: Upload Forge Artifact
44-
uses: actions/upload-artifact@v2
44+
uses: actions/upload-artifact@v4
4545
with:
4646
name: TesseractAPI Forge JAR
4747
path: forge/build/libs
4848
env:
4949
USERNAME: ${{ github.actor }}
5050
TOKEN: ${{ secrets.GITHUB_TOKEN }}
5151
- name: Upload Fabric Artifact
52-
uses: actions/upload-artifact@v2
52+
uses: actions/upload-artifact@v4
5353
with:
5454
name: TesseractAPI Fabric JAR
5555
path: fabric/build/libs

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ jobs:
3131
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
3232
GITHUB_RELEASE: true
3333
- name: Upload Forge Artifact
34-
uses: actions/upload-artifact@v2
34+
uses: actions/upload-artifact@v4
3535
with:
3636
name: Antimatter-forge-nightly-${{ steps.vars.outputs.sha_short }}
3737
path: forge/build/libs
3838
env:
3939
USERNAME: ${{ github.actor }}
4040
TOKEN: ${{ secrets.GITHUB_TOKEN }}
4141
- name: Upload Fabric Artifact
42-
uses: actions/upload-artifact@v2
42+
uses: actions/upload-artifact@v4
4343
with:
4444
name: Antimatter-fabric-nightly-${{ steps.vars.outputs.sha_short }}
4545
path: fabric/build/libs

Jenkinsfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
pipeline {
2+
agent any
3+
tools {
4+
jdk "jdk-21" // valid options are: "jdk-8", "jdk-16", "jdk-17" or "jdk-21", choose which one you need
5+
}
6+
stages {
7+
stage('Clean') {
8+
steps {
9+
echo 'Cleaning Project'
10+
sh 'chmod +x gradlew'
11+
sh './gradlew clean'
12+
}
13+
}
14+
stage('Build & Publish') {
15+
steps {
16+
echo 'Building & Publishing'
17+
sh './gradlew build publish'
18+
}
19+
}
20+
}
21+
post {
22+
always {
23+
discordSend(
24+
webhookURL: "https://discord.com/api/webhooks/1313642177083216073/H8EnQ65JusCjpqGTqLXDZI1BYBe4ArLJn3xSjEOWthg4Nwa7ZFSHu1SYag8fU4v4DB8k",
25+
thumbnail: "https://raw.githubusercontent.com/GT-Reimagined/gt-reimagined.github.io/refs/heads/main/icon.png",
26+
title: "Tesseract API ${TAG_NAME} #${BUILD_NUMBER}",
27+
link: env.BUILD_URL,
28+
result: currentBuild.currentResult,
29+
description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})\nStatus: ${currentBuild.currentResult}"
30+
)
31+
}
32+
}
33+
}

build.gradle

Lines changed: 10 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,24 @@
11
plugins {
22
id "maven-publish"
3-
id "architectury-plugin" version "3.4-SNAPSHOT"
4-
id "dev.architectury.loom" version "1.3-SNAPSHOT" apply(false)
5-
id "com.github.johnrengelman.shadow" version "7.0.0" apply(false)
3+
id "idea"
4+
id "fabric-loom" version "1.7-SNAPSHOT" apply false
5+
id "net.neoforged.moddev.legacyforge" version "2.0.58-beta" apply false
66
}
77

8-
architectury {
9-
minecraft = rootProject.minecraft_version
10-
}
11-
12-
def isCI = System.getenv("GITHUB_ACTION")
13-
def isRELEASE = System.getenv("GITHUB_RELEASE")
8+
def isGITHU_ACTION = System.getenv("GITHUB_ACTION")
149
def gitHash() {
1510
String hash = System.getenv("GITHUB_SHA")
1611
if (hash != null) return hash.substring(0,8)
1712
return ""
1813
}
1914

2015
subprojects {
21-
apply plugin: "dev.architectury.loom"
22-
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
23-
24-
loom {
25-
silentMojangMappingsLicense()
26-
}
27-
28-
dependencies {
29-
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
30-
// The following line declares the mojmap mappings, you may use other mappings as well
31-
mappings loom.layered() {
32-
officialMojangMappings()
33-
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.mappings_version}@zip")
34-
}
35-
36-
// The following line declares the yarn mappings you may select this one as well.
37-
// mappings "net.fabricmc:yarn:1.17.1+build.32:v2"
38-
}
39-
40-
41-
}
42-
43-
allprojects {
4416
apply plugin: "maven-publish"
4517
apply plugin: "java"
46-
apply plugin: "architectury-plugin"
47-
48-
49-
18+
apply plugin: "idea"
5019
group = rootProject.maven_group
51-
20+
version = "${project.mod_version}-${rootProject.minecraft_version}"
21+
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
5222
apply from: 'https://raw.githubusercontent.com/GregTech-Intergalactical/GradleSripts/main/repositories.gradle'
5323

5424
java {
@@ -59,46 +29,8 @@ allprojects {
5929
it.options.encoding = 'UTF-8'
6030
}
6131

62-
if (isCI) {
32+
if (isGITHU_ACTION) {
6333
version = version + "-" + gitHash()
34+
println("In CI mode")
6435
}
65-
}
66-
67-
subprojects{
68-
if (!project.path.contains("common")){
69-
apply plugin: "com.github.johnrengelman.shadow"
70-
71-
configurations {
72-
common
73-
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
74-
compileClasspath.extendsFrom common
75-
runtimeClasspath.extendsFrom common
76-
if (project.path.contains("forge")){
77-
developmentForge.extendsFrom common
78-
} else{
79-
developmentFabric.extendsFrom common
80-
}
81-
}
82-
83-
shadowJar {
84-
configurations = [project.configurations.shadowCommon]
85-
archiveClassifier.set "dev-shadow"
86-
}
87-
88-
remapJar {
89-
input.set shadowJar.archiveFile
90-
dependsOn shadowJar
91-
archiveClassifier.set null
92-
}
93-
94-
jar {
95-
archiveClassifier.set "dev"
96-
}
97-
98-
components.java {
99-
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
100-
skip()
101-
}
102-
}
103-
}
104-
}
36+
}

common/build.gradle

Lines changed: 17 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,35 @@
1-
archivesBaseName = rootProject.tesseract_archive_base_name
2-
version = "${project.mod_version}-${rootProject.minecraft_version}"
3-
4-
sourceSets {
5-
test {
6-
compileClasspath += main.compileClasspath
7-
runtimeClasspath += main.runtimeClasspath
8-
}
9-
}
10-
11-
loom {
12-
runs {
13-
testClient {
14-
client()
15-
ideConfigGenerated project.rootProject == project
16-
name = "Testmod Client"
17-
source sourceSets.test
18-
}
19-
testServer {
20-
server()
21-
ideConfigGenerated project.rootProject == project
22-
name = "Testmod Server"
23-
source sourceSets.test
24-
}
25-
}
1+
plugins {
2+
id "fabric-loom"
263
}
4+
archivesBaseName = "${project.tesseract_archive_base_name}-common"
275

286
dependencies{
29-
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
30-
compileOnly("com.electronwill.night-config:toml:${rootProject.nightconfig_version}")
31-
compileOnly("com.electronwill.night-config:core:${rootProject.nightconfig_version}")
32-
modImplementation("earth.terrarium:botarium-common-${project.minecraft_version}:${project.botarium_version}")
33-
modImplementation "maven.modrinth:carbon-config:${project.carbon_config_fabric_version}"
34-
testImplementation('junit:junit:4.11')
35-
testImplementation(sourceSets.main.output)
36-
}
37-
38-
architectury {
39-
common("forge", "fabric")
7+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
8+
mappings loom.layered() {
9+
officialMojangMappings()
10+
parchment("org.parchmentmc.data:parchment-${project.minecraft_version}:${project.mappings_version}@zip")
11+
}
12+
//compileOnly("com.electronwill.night-config:toml:${rootProject.nightconfig_version}")
13+
//compileOnly("com.electronwill.night-config:core:${rootProject.nightconfig_version}")
14+
modImplementation("earth.terrarium:botarium-fabric-${project.minecraft_version}:${project.botarium_version}")
15+
implementation 'com.github.Carbon-Config-Project:CarbonConfigLib:1.3.0'
4016
}
4117

4218
publishing {
4319
publications {
4420
mavenJava(org.gradle.api.publish.maven.MavenPublication) {
45-
artifact(sourcesJar) {
46-
builtBy remapSourcesJar
47-
}
48-
49-
afterEvaluate {
50-
artifact remapJar
51-
}
21+
from components.java
5222
}
5323
}
5424

5525
repositories {
56-
def isCI = System.getenv("GITHUB_ACTION")
57-
def isRELEASE = System.getenv("GITHUB_RELEASE")
58-
if (isCI && isRELEASE) {
26+
def isCI = System.getenv("CI")
27+
if (isCI) {
5928
maven {
60-
url = "https://repo.repsy.io/mvn/trinsdar/gregtech-intergalactical/"
61-
credentials {
62-
username = System.getenv("MAVEN_USERNAME")
63-
password = System.getenv("MAVEN_PASSWORD")
64-
}
29+
url System.getenv("local_maven_url")
6530
}
6631
} else {
67-
maven { url "file:///${project.projectDir}/mcmodsrepo"}
32+
mavenLocal()
6833
}
6934
}
7035
}

common/gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
mod_version=0.2.3
1+
mod_version=0.2.4.1
2+
fabric.loom.dontRemap=true

common/src/main/java/tesseract/FluidPlatformUtils.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package tesseract;
22

3-
import dev.architectury.injectables.annotations.ExpectPlatform;
4-
5-
63
import earth.terrarium.botarium.common.fluid.base.FluidHolder;
74
import earth.terrarium.botarium.common.fluid.base.PlatformFluidHandler;
85
import earth.terrarium.botarium.common.fluid.base.PlatformFluidItemHandler;

common/src/main/java/tesseract/Tesseract.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
package tesseract;
22

3-
import carbonconfiglib.config.Config;
4-
import carbonconfiglib.config.ConfigHandler;
5-
import dev.architectury.injectables.annotations.ExpectPlatform;
63
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
74
import net.minecraft.world.level.LevelAccessor;
85
import org.apache.logging.log4j.LogManager;
96
import org.apache.logging.log4j.Logger;
10-
import tesseract.api.GraphWrapper;
11-
import tesseract.api.gt.GTTransaction;
12-
import tesseract.api.gt.IGTCable;
13-
import tesseract.api.gt.IGTNode;
147

158
import java.util.Set;
169

common/src/main/java/tesseract/TesseractCapUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package tesseract;
22

3-
import dev.architectury.injectables.annotations.ExpectPlatform;
43
import earth.terrarium.botarium.common.fluid.base.PlatformFluidHandler;
54
import net.minecraft.core.BlockPos;
65
import net.minecraft.core.Direction;

common/src/main/java/tesseract/TesseractPlatformUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import carbonconfiglib.config.Config;
44
import carbonconfiglib.config.ConfigHandler;
5-
import dev.architectury.injectables.annotations.ExpectPlatform;
65
import net.minecraft.core.Direction;
76
import net.minecraft.world.item.ItemStack;
87
import net.minecraft.world.level.Level;

0 commit comments

Comments
 (0)