Skip to content

Commit

Permalink
Almost workable fission reactor (#2433)
Browse files Browse the repository at this point in the history
Co-authored-by: TechLord22 <[email protected]>
Co-authored-by: Serenibyss <[email protected]>
Co-authored-by: iouter <[email protected]>
Co-authored-by: DStrand1 <[email protected]>
Co-authored-by: alongstringofnumbers <[email protected]>
Co-authored-by: Tictim <[email protected]>
Co-authored-by: ALongStringOfNumbers <[email protected]>
Co-authored-by: M_W_K <[email protected]>
Co-authored-by: Ghzdude <[email protected]>
Co-authored-by: mtbo <[email protected]>
Co-authored-by: YoungOnion <[email protected]>
Co-authored-by: Loxo <[email protected]>
Co-authored-by: htmlcsjs <[email protected]>
Co-authored-by: brachy84 <[email protected]>
Co-authored-by: froot <[email protected]>
Co-authored-by: tier940 <[email protected]>
  • Loading branch information
17 people authored Jun 2, 2024
1 parent 1e6425a commit 8e8e5b8
Show file tree
Hide file tree
Showing 396 changed files with 12,898 additions and 5,311 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/publish_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ jobs:
generate_release_notes: true
fail_on_unmatched_files: true

- name: Publish to Maven
env:
MAVEN_USER: "${{ secrets.MAVEN_USER }}"
MAVEN_PASSWORD: "${{ secrets.MAVEN_PASSWORD }}"
run: ./gradlew publish

- name: Publish to Curseforge
env:
CURSEFORGE_API_KEY: "${{ secrets.CURSEFORGE_API_KEY }}"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Anything else? Sure come to [Discord](https://discord.gg/bWSWuYvURP).
## Credited Works
Heating Coil Textures, Wooden Forms, World Accelerators, and the Extreme Combustion Engine are from the **[GregTech: New Horizons Modpack](https://www.curseforge.com/minecraft/modpacks/gt-new-horizons)**.

Primitive Water Pump and Super Tank GUI Textures are from the **[IMPACT: GREGTECH EDITION Modpack](https://gtimpact.space/)**.
Primitive Water Pump and Super Tank GUI Textures are from the **[IMPACT: GREGTECH EDITION Modpack](https://gt-impact.github.io/)**.

Ender Fluid Link Cover, Auto-Maintenance Hatch, Optical Fiber, and Data Bank Textures are from **[TecTech](https://github.com/Technus/TecTech)**.

Expand Down
121 changes: 97 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1702805890
//version: 1707682661
/*
* DO NOT CHANGE THIS FILE!
* Also, you may replace this file at any time if there is an update available.
Expand All @@ -24,9 +24,9 @@ plugins {
id 'eclipse'
id 'maven-publish'
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.25'
id 'net.darkhax.curseforgegradle' version '1.1.17' apply false
id 'com.modrinth.minotaur' version '2.8.6' apply false
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.33'
id 'net.darkhax.curseforgegradle' version '1.1.18' apply false
id 'com.modrinth.minotaur' version '2.8.7' apply false
id 'com.diffplug.spotless' version '6.13.0' apply false
id 'com.palantir.git-version' version '3.0.0' apply false
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
Expand Down Expand Up @@ -62,6 +62,7 @@ propertyDefaultIfUnset("generateGradleTokenClass", "")
propertyDefaultIfUnset("gradleTokenModId", "")
propertyDefaultIfUnset("gradleTokenModName", "")
propertyDefaultIfUnset("gradleTokenVersion", "")
propertyDefaultIfUnset("useSrcApiPath", false)
propertyDefaultIfUnset("includeWellKnownRepositories", true)
propertyDefaultIfUnset("includeCommonDevEnvMods", true)
propertyDefaultIfUnset("noPublishedSources", false)
Expand Down Expand Up @@ -105,9 +106,16 @@ if (!getFile(targetPackageJava).exists() && !getFile(targetPackageScala).exists(
}

if (apiPackage) {
targetPackageJava = javaSourceDir + modGroupPath + '/' + apiPackagePath
targetPackageScala = scalaSourceDir + modGroupPath + '/' + apiPackagePath
targetPackageKotlin = kotlinSourceDir + modGroupPath + '/' + apiPackagePath
final String endApiPath = modGroupPath + '/' + apiPackagePath
if (useSrcApiPath) {
targetPackageJava = 'src/api/java/' + endApiPath
targetPackageScala = 'src/api/scala/' + endApiPath
targetPackageKotlin = 'src/api/kotlin/' + endApiPath
} else {
targetPackageJava = javaSourceDir + endApiPath
targetPackageScala = scalaSourceDir + endApiPath
targetPackageKotlin = kotlinSourceDir + endApiPath
}
if (!getFile(targetPackageJava).exists() && !getFile(targetPackageScala).exists() && !getFile(targetPackageKotlin).exists()) {
throw new GradleException("Could not resolve \"apiPackage\"! Could not find ${targetPackageJava} or ${targetPackageScala} or ${targetPackageKotlin}")
}
Expand Down Expand Up @@ -436,8 +444,11 @@ repositories {
}
maven {
name 'GTNH Maven'
url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public'
allowInsecureProtocol = true
url 'https://nexus.gtnewhorizons.com/repository/public/'
}
maven {
name 'GTCEu Maven'
url 'https://maven.gtceu.com'
}
}
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
Expand Down Expand Up @@ -466,9 +477,25 @@ configurations {
config.extendsFrom(shadowCompile)
}
}

create("runtimeOnlyNonPublishable") {
description = "Runtime only dependencies that are not published alongside the jar"
canBeConsumed = false
canBeResolved = false
}
create("devOnlyNonPublishable") {
description = "Runtime and compiletime dependencies that are not published alongside the jar (compileOnly + runtimeOnlyNonPublishable)"
canBeConsumed = false
canBeResolved = false
}

compileOnly.extendsFrom(devOnlyNonPublishable)
runtimeOnlyNonPublishable.extendsFrom(devOnlyNonPublishable)
runtimeClasspath.extendsFrom(runtimeOnlyNonPublishable)
testRuntimeClasspath.extendsFrom(runtimeOnlyNonPublishable)
}

String mixinProviderSpec = 'zone.rong:mixinbooter:8.9'
String mixinProviderSpec = 'zone.rong:mixinbooter:9.1'
dependencies {
if (usesMixins.toBoolean()) {
annotationProcessor 'org.ow2.asm:asm-debug-all:5.2'
Expand All @@ -486,7 +513,7 @@ dependencies {
transitive = false
}
} else if (forceEnableMixins.toBoolean()) {
runtimeOnly(mixinProviderSpec)
runtimeOnlyNonPublishable(mixinProviderSpec)
}

if (enableJUnit.toBoolean()) {
Expand All @@ -496,8 +523,8 @@ dependencies {
}

if (enableModernJavaSyntax.toBoolean()) {
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.0'
compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.0') {
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.1'
compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.1') {
transitive = false
}
// workaround for https://github.com/bsideup/jabel/issues/174
Expand All @@ -506,8 +533,8 @@ dependencies {
patchedMinecraft 'me.eigenraven.java8unsupported:java-8-unsupported-shim:1.0.0'

// allow Jabel to work in tests
testAnnotationProcessor "com.github.bsideup.jabel:jabel-javac-plugin:1.0.0"
testCompileOnly("com.github.bsideup.jabel:jabel-javac-plugin:1.0.0") {
testAnnotationProcessor "com.github.bsideup.jabel:jabel-javac-plugin:1.0.1"
testCompileOnly("com.github.bsideup.jabel:jabel-javac-plugin:1.0.1") {
transitive = false // We only care about the 1 annotation class
}
testCompileOnly "me.eigenraven.java8unsupported:java-8-unsupported-shim:1.0.0"
Expand All @@ -520,9 +547,13 @@ dependencies {
}

if (includeCommonDevEnvMods.toBoolean()) {
implementation 'mezz.jei:jei_1.12.2:4.16.1.302'
//noinspection DependencyNotationArgument
implementation rfg.deobf('curse.maven:top-245211:2667280') // TOP 1.4.28
if (!(modId.equals('jei'))) {
implementation 'mezz.jei:jei_1.12.2:4.16.1.302'
}
if (!(modId.equals('theoneprobe'))) {
//noinspection DependencyNotationArgument
implementation rfg.deobf('curse.maven:top-245211:2667280') // TOP 1.4.28
}
}
}

Expand All @@ -534,6 +565,12 @@ pluginManager.withPlugin('org.jetbrains.kotlin.kapt') {
}
}

configurations.configureEach {
resolutionStrategy.dependencySubstitution {
substitute module('org.scala-lang:scala-library:2.11.1') using module('org.scala-lang:scala-library:2.11.5') because('To allow mixing with Java 8 targets')
}
}

if (getFile('dependencies.gradle').exists()) {
apply from: 'dependencies.gradle'
} else if (getFile('dependencies.gradle.kts').exists()) {
Expand Down Expand Up @@ -675,6 +712,19 @@ jar {
it.isDirectory() ? it : zipTree(it)
}
}

if (useSrcApiPath && apiPackage) {
from sourceSets.api.output
dependsOn apiClasses

include "${modGroupPath}/**"
include "assets/**"
include "mcmod.info"
include "pack.mcmeta"
if (accessTransformersFile) {
include "META-INF/${accessTransformersFile}"
}
}
}

// Configure default run tasks
Expand All @@ -691,12 +741,21 @@ if (separateRunDirectories.toBoolean()) {
// Create API library jar
tasks.register('apiJar', Jar) {
archiveClassifier.set 'api'
from(sourceSets.main.java) {
include "${modGroupPath}/${apiPackagePath}/**"
}
if (useSrcApiPath) {
from(sourceSets.api.java) {
include "${modGroupPath}/${apiPackagePath}/**"
}
from(sourceSets.api.output) {
include "${modGroupPath}/${apiPackagePath}/**"
}
} else {
from(sourceSets.main.java) {
include "${modGroupPath}/${apiPackagePath}/**"
}

from(sourceSets.main.output) {
include "${modGroupPath}/${apiPackagePath}/**"
from(sourceSets.main.output) {
include "${modGroupPath}/${apiPackagePath}/**"
}
}
}

Expand Down Expand Up @@ -906,6 +965,12 @@ if (cfApiKey.isPresent() || deploymentDebug.toBoolean()) {
}
String[] parts = dep.split(':')
String type = parts[0], slug = parts[1]
def types = [
'req' : 'requiredDependency', 'required': 'requiredDependency',
'opt' : 'optionalDependency', 'optional': 'optionalDependency',
'embed' : 'embeddedLibrary', 'embedded': 'embeddedLibrary',
'incomp': 'incompatible', 'fail' : 'incompatible']
if (types.containsKey(type)) type = types[type]
if (!(type in ['requiredDependency', 'embeddedLibrary', 'optionalDependency', 'tool', 'incompatible'])) {
throw new Exception('Invalid Curseforge dependency type: ' + type)
}
Expand Down Expand Up @@ -948,7 +1013,7 @@ if (modrinthApiKey.isPresent() || deploymentDebug.toBoolean()) {
}
String[] parts = dep.split(':')
String[] qual = parts[0].split('-')
addModrinthDep(qual[0], qual[1], parts[1])
addModrinthDep(qual[0], qual.length > 1 ? qual[1] : 'project', parts[1])
}
}
tasks.modrinth.dependsOn(build)
Expand All @@ -957,9 +1022,17 @@ if (modrinthApiKey.isPresent() || deploymentDebug.toBoolean()) {

def addModrinthDep(String scope, String type, String name) {
com.modrinth.minotaur.dependencies.Dependency dep
def types = [
'req' : 'required',
'opt' : 'optional',
'embed' : 'embedded',
'incomp': 'incompatible', 'fail': 'incompatible']
if (types.containsKey(scope)) scope = types[scope]
if (!(scope in ['required', 'optional', 'incompatible', 'embedded'])) {
throw new Exception('Invalid modrinth dependency scope: ' + scope)
}
types = ['proj': 'project', '': 'project', 'p': 'project', 'ver': 'version', 'v': 'version']
if (types.containsKey(type)) type = types[type]
switch (type) {
case 'project':
dep = new ModDependency(name, scope)
Expand Down
93 changes: 53 additions & 40 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,66 +1,79 @@
//file:noinspection DependencyNotationArgument
// TODO remove when fixed in RFG ^
/*
* Add your dependencies here. Common configurations:
* - implementation("group:name:version:classifier"): if you need this for internal implementation details of the mod.
* Available at compiletime and runtime for your environment.
*
* - compileOnlyApi("g:n:v:c"): if you need this for internal implementation details of the mod.
* Available at compiletime but not runtime for your environment.
*
* Add your dependencies here. Supported configurations:
* - api("group:name:version:classifier"): if you use the types from this dependency in the public API of this mod
* Available at runtime and compiletime for mods depending on this mod
* - implementation("g:n:v:c"): if you need this for internal implementation details of the mod, but none of it is visible via the public API
* Available at runtime but not compiletime for mods depending on this mod
* - compileOnly("g:n:v:c"): if the mod you're building doesn't need this dependency during runtime at all, e.g. for optional mods
* Not available at all for mods depending on this mod, only visible at compiletime for this mod
* - compileOnlyApi("g:n:v:c"): like compileOnly, but also visible at compiletime for mods depending on this mod
* Available at compiletime but not runtime for mods depending on this mod
* - runtimeOnlyNonPublishable("g:n:v:c"): if you want to include a mod in this mod's runClient/runServer runs, but not publish it as a dependency
* Not available at all for mods depending on this mod, only visible at runtime for this mod
* - devOnlyNonPublishable("g:n:v:c"): a combination of runtimeOnlyNonPublishable and compileOnly for dependencies present at both compiletime and runtime,
* but not published as Maven dependencies - useful for RFG-deobfuscated dependencies or local testing
* - runtimeOnly("g:n:v:c"): if you don't need this at compile time, but want it to be present at runtime
* Available at runtime for mods depending on this mod
* - annotationProcessor("g:n:v:c"): mostly for java compiler plugins, if you know you need this, use it, otherwise don't worry
* - testCONFIG("g:n:v:c") - replace CONFIG by one of the above (except api), same as above but for the test sources instead of main
*
* - testCONFIG("g:n:v:c"): replace CONFIG by one of the above, same as above but for the test sources instead of main
* - shadowImplementation("g:n:v:c"): effectively the same as API, but the dependency is included in your jar under a renamed package name
* Requires you to enable usesShadowedDependencies in gradle.properties
* For more info, see https://github.com/GregTechCEu/Buildscripts/blob/master/docs/shadow.md
*
* You can exclude transitive dependencies (dependencies of the chosen dependency) by appending { transitive = false } if needed.
* You can exclude transitive dependencies (dependencies of the chosen dependency) by appending { transitive = false } if needed,
* but use this sparingly as it can break using your mod as another mod's dependency if you're not careful.
*
* To depend on obfuscated jars you can use `devOnlyNonPublishable(rfg.deobf("dep:spec:1.2.3"))` to fetch an obfuscated jar from maven,
* or `devOnlyNonPublishable(rfg.deobf(project.files("libs/my-mod-jar.jar")))` to use a file.
*
* To add a mod with CurseMaven, replace '("g:n:v:c")' in the above with 'rfg.deobf("curse.maven:project_slug-project_id:file_id")'
* Example: implementation rfg.deobf("curse.maven:gregtech-ce-unofficial-557242:4527757")
* Example: devOnlyNonPublishable(rfg.deobf("curse.maven:top-245211:2667280"))
*
* Gradle names for some of the configuration can be misleading, compileOnlyApi and runtimeOnly both get published as dependencies in Maven, but compileOnly does not.
* The buildscript adds runtimeOnlyNonPublishable to also have a runtime dependency that's not published.
*
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
* For more details, see https://docs.gradle.org/8.4/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/
dependencies {
// Hard Dependencies

// the CCL deobf jar uses very old MCP mappings, making it error at runtime in runClient/runServer
// therefore we manually deobf the regular jar
implementation rfg.deobf("curse.maven:codechicken-lib-1-8-242818:2779848") // CCL 3.2.3.358
implementation("com.cleanroommc:modularui:2.4.1") { transitive = false }

// Soft Dependencies
// Can change any of these from compileOnlyApi -> implementation to test them in-game.

implementation "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.684"
implementation rfg.deobf("curse.maven:ctm-267602:2915363") // CTM 1.0.2.31
implementation("com.cleanroommc:groovyscript:0.7.1") { transitive = false }
implementation rfg.deobf("curse.maven:ae2-extended-life-570458:4402048") // AE2UEL 0.55.6
// Published dependencies
api("codechicken:codechickenlib:3.2.3.358")
api("com.cleanroommc:modularui:2.4.3") { transitive = false }
api("com.cleanroommc:groovyscript:1.0.1") { transitive = false }
api("CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.684")
api rfg.deobf("curse.maven:ae2-extended-life-570458:4402048") // AE2UEL 0.55.6
api rfg.deobf("curse.maven:ctm-267602:2915363") // CTM 1.0.2.31

compileOnlyApi rfg.deobf("curse.maven:opencomputers-223008:4526246") // OpenComputers 1.8.0+9833087
compileOnlyApi "curse.maven:journeymap-32274:2916002" // Journeymap 5.7.1
compileOnlyApi "curse.maven:voxelmap-225179:3029445" // VoxelMap 1.9.28
compileOnlyApi "curse.maven:xaeros-263420:4516832" // Xaero's Minimap 23.4.1
compileOnlyApi rfg.deobf("curse.maven:hwyla-253449:2568751") // HWYLA 1.8.26-B41
compileOnlyApi rfg.deobf("curse.maven:baubles-227083:2518667") // Baubles 1.5.2
compileOnlyApi rfg.deobf("curse.maven:forestry-59751:2684780") // Forestry 5.8.2.387
compileOnlyApi rfg.deobf("curse.maven:chisel-235279:2915375") // Chisel 1.0.2.45
// Non-published dependencies
// Change any to devOnlyNonPublishable to test them in-game.
compileOnly("curse.maven:journeymap-32274:2916002") // Journeymap 5.7.1
compileOnly("curse.maven:voxelmap-225179:3029445") // VoxelMap 1.9.28
compileOnly("curse.maven:xaeros-263420:4516832") // Xaero's Minimap 23.4.1
compileOnly rfg.deobf("curse.maven:opencomputers-223008:4526246") // OpenComputers 1.8.0+9833087
compileOnly rfg.deobf("curse.maven:hwyla-253449:2568751") // HWYLA 1.8.26-B41
compileOnly rfg.deobf("curse.maven:baubles-227083:2518667") // Baubles 1.5.2
compileOnly rfg.deobf("curse.maven:forestry-59751:2684780") // Forestry 5.8.2.387
compileOnly rfg.deobf("curse.maven:chisel-235279:2915375") // Chisel 1.0.2.45

// Mods with Soft compat but which have no need to be in code, such as isModLoaded() checks and getModItem() recipes.
// Uncomment any of these to test them in-game.

// runtimeOnly rfg.deobf("curse.maven:beebetteratbees-244516:2627215") // BeeBetterAtBees 2.0.3 (recommended to enable when testing Forestry compat)
// runtimeOnly rfg.deobf("curse.maven:jei-bees-248370:2490058") // JEIBees 0.9.0.5 (recommended to enable when testing Forestry compat)
// runtimeOnly rfg.deobf("curse.maven:binnies-mods-223525:2916129") // Binnie 2.5.1.203
// runtimeOnly rfg.deobf("curse.maven:magic-bees-65764:2855061") // Magic Bees 3.2.25
// runtimeOnly rfg.deobf("curse.maven:gendustry-70492:2516215") // Gendustry 1.6.5.8
// runtimeOnly rfg.deobf("curse.maven:bdlib-70496:2518031") // BdLib 1.14.3.12
// runtimeOnlyNonPublishable rfg.deobf("curse.maven:beebetteratbees-244516:2627215") // BeeBetterAtBees 2.0.3 (recommended to enable when testing Forestry compat)
// runtimeOnlyNonPublishable rfg.deobf("curse.maven:jei-bees-248370:2490058") // JEIBees 0.9.0.5 (recommended to enable when testing Forestry compat)
// runtimeOnlyNonPublishable rfg.deobf("curse.maven:binnies-mods-223525:2916129") // Binnie 2.5.1.203
// runtimeOnlyNonPublishable rfg.deobf("curse.maven:magic-bees-65764:2855061") // Magic Bees 3.2.25
// runtimeOnlyNonPublishable rfg.deobf("curse.maven:gendustry-70492:2516215") // Gendustry 1.6.5.8
// runtimeOnlyNonPublishable rfg.deobf("curse.maven:bdlib-70496:2518031") // BdLib 1.14.3.12
}

minecraft {
injectedTags.put('DEP_VERSION_STRING', "required-after:gregtech@[${modVersion},);")
}

configurations {
implementation {
compileOnly {
// exclude GNU trove, FastUtil is superior and still updated
exclude group: "net.sf.trove4j", module: "trove4j"
// exclude javax.annotation from findbugs, jetbrains annotations are superior
Expand Down
Loading

0 comments on commit 8e8e5b8

Please sign in to comment.