Skip to content

Commit eacecbd

Browse files
committed
👀 First compile hype
1 parent c8a3eae commit eacecbd

File tree

107 files changed

+1781
-2038
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1781
-2038
lines changed

src/test/java/dev/compactmods/machines/tests/GraphTests.java renamed to 1.16.5-test/java/dev/compactmods/machines/tests/GraphTests.java

File renamed without changes.

src/test/java/dev/compactmods/machines/tests/MathTests.java renamed to 1.16.5-test/java/dev/compactmods/machines/tests/MathTests.java

File renamed without changes.

src/test/java/dev/compactmods/machines/tests/codec/CodecTests.java renamed to 1.16.5-test/java/dev/compactmods/machines/tests/codec/CodecTests.java

File renamed without changes.

src/test/java/dev/compactmods/machines/tests/minecraft/ExampleTest.java renamed to 1.16.5-test/java/dev/compactmods/machines/tests/minecraft/ExampleTest.java

File renamed without changes.

src/test/java/dev/compactmods/machines/tests/nbt/MachineExternalDataTests.java renamed to 1.16.5-test/java/dev/compactmods/machines/tests/nbt/MachineExternalDataTests.java

File renamed without changes.

src/test/java/dev/compactmods/machines/tests/util/FileHelper.java renamed to 1.16.5-test/java/dev/compactmods/machines/tests/util/FileHelper.java

File renamed without changes.

src/test/resources/scenario/single-machine-player-inside/machines_external.dat renamed to 1.16.5-test/resources/scenario/single-machine-player-inside/machines_external.dat

File renamed without changes.

src/test/resources/scenario/single-machine-player-inside/machines_internal.dat renamed to 1.16.5-test/resources/scenario/single-machine-player-inside/machines_internal.dat

File renamed without changes.

src/test/resources/scenario/single-machine-player-inside/players.dat renamed to 1.16.5-test/resources/scenario/single-machine-player-inside/players.dat

File renamed without changes.

build.gradle

Lines changed: 23 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
22
repositories {
3-
maven { url = 'https://files.minecraftforge.net/maven' }
3+
maven { url = 'https://maven.minecraftforge.net' }
44
mavenCentral()
55
}
66

77
dependencies {
8-
classpath "net.minecraftforge.gradle:ForgeGradle:4.1.12"
8+
classpath "net.minecraftforge.gradle:ForgeGradle:5.1.+"
99
}
1010
}
1111

@@ -27,7 +27,7 @@ archivesBaseName = mod_id
2727
println("Mod ID: ${mod_id}");
2828
println("Version: ${version}");
2929

30-
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
30+
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
3131

3232
sourceSets {
3333
api {
@@ -48,13 +48,11 @@ sourceSets {
4848
srcDir 'src/generated/resources'
4949
}
5050
}
51-
52-
test
5351
}
5452

5553
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
5654
minecraft {
57-
mappings channel: 'official', version: mappings_version
55+
mappings channel: 'official', version: minecraft_version
5856
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
5957

6058
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
@@ -125,29 +123,6 @@ minecraft {
125123
}
126124
}
127125
}
128-
129-
unitTests {
130-
parent runs.server // This run config inherits settings from the server config
131-
workingDirectory project.file('run/test')
132-
main 'com.alcatrazescapee.mcjunitlib.DedicatedTestServerLauncher'
133-
// The main class which launches a customized server which then runs JUnit tests
134-
ideaModule "${project.name}.test" // Tell IDEA to use the classpath of the test module
135-
property 'forge.logging.console.level', 'unittest'
136-
// This logging level prevents any other server information messages and leaves only the unit test output
137-
environment 'MOD_CLASSES', String.join(File.pathSeparator,
138-
"${mod_id}%%${sourceSets.main.output.resourcesDir}",
139-
"${mod_id}%%${sourceSets.main.output.classesDirs[0]}",
140-
"${mod_id}%%${sourceSets.test.output.resourcesDir}",
141-
"${mod_id}%%${sourceSets.test.output.classesDirs[0]}",
142-
) // Forge will ignore all test sources unless we explicitly tell it to include them as mod sources
143-
environment 'target', 'fmltestserver'
144-
// This is a custom service used to launch with ModLauncher's transforming class loader
145-
mods {
146-
compactmachines { // The mod that is being tested - Replace this with your mod ID!
147-
sources sourceSets.api, sourceSets.main
148-
}
149-
}
150-
}
151126
}
152127
}
153128

@@ -192,30 +167,23 @@ repositories {
192167
dirs dev_mods_dir
193168
}
194169

170+
maven {
171+
url "https://www.cursemaven.com"
172+
content {
173+
includeGroup "curse.maven"
174+
}
175+
}
176+
195177
// location of the maven that hosts JEI files
196178
maven {
197179
name "Progwml Repo"
198-
url "http://dvs1.progwml6.com/files/maven"
180+
url "https://dvs1.progwml6.com/files/maven"
199181
}
200182

201183
// TheOneProbe
202184
maven {
203185
name 'tterrag maven'
204-
url "http://maven.tterrag.com/"
205-
}
206-
207-
// Unit Tests
208-
maven {
209-
name 'MCUnitTests'
210-
url 'https://jitpack.io'
211-
}
212-
213-
// Curseforge stuff
214-
maven {
215-
url "https://cursemaven.com"
216-
content {
217-
includeGroup "curse.maven"
218-
}
186+
url "https://maven.tterrag.com/"
219187
}
220188
}
221189

@@ -237,17 +205,17 @@ dependencies {
237205
runtimeOnly fg.deobf("mezz.jei:jei-${jei_mc_version}:${jei_version}")
238206

239207
// The One Probe
240-
compileOnly fg.deobf("mcjty.theoneprobe:TheOneProbe-1.16:${top_version}:api")
241-
runtimeOnly fg.deobf("mcjty.theoneprobe:TheOneProbe-1.16:${top_version}")
208+
// compileOnly fg.deobf("mcjty.theoneprobe:TheOneProbe-1.16:${top_version}:api")
209+
// runtimeOnly fg.deobf("mcjty.theoneprobe:TheOneProbe-1.16:${top_version}")
242210

243-
testImplementation(fg.deobf("com.github.alcatrazEscapee:mcjunitlib:1.3.3-${minecraft_version}"))
211+
// testImplementation(fg.deobf("com.github.alcatrazEscapee:mcjunitlib:1.3.3-${minecraft_version}"))
244212

245213
// Nicephore - Screenshots and Stuff
246-
runtimeOnly(fg.deobf("curse.maven:nicephore-401014:3318114"))
214+
// runtimeOnly(fg.deobf("curse.maven:nicephore-401014:3318114"))
247215

248216
// Mekanism + Mek Generators - Tunnel testing
249-
runtimeOnly(fg.deobf("curse.maven:mekanism-268560:3206392"))
250-
runtimeOnly(fg.deobf("curse.maven:mekanismgenerators-268566:3206395"))
217+
// runtimeOnly(fg.deobf("curse.maven:mekanism-268560:3206392"))
218+
// runtimeOnly(fg.deobf("curse.maven:mekanismgenerators-268566:3206395"))
251219
}
252220

253221
// Example for how to get properties into the manifest for reading by the runtime..
@@ -277,6 +245,10 @@ task apiJar(type: Jar) {
277245
destinationDirectory = file("$rootDir/build-out")
278246
}
279247

248+
processResources {
249+
duplicatesStrategy = DuplicatesStrategy.WARN
250+
}
251+
280252
artifacts {
281253
archives jar, apiJar
282254
}

0 commit comments

Comments
 (0)