NECESSARY GRADLE CHANGES FOR MULTI GTNH GRADLE SUBMODULE FUNCTIONALITY

This commit is contained in:
bigguy345 committed 2026-03-15 13:17:21 +02:00
1 parent f58aed7b57
commit 18ca0eb41d
2 files changed
+30 -39

No files matched your search

+9 -29
View File
@@ -1,33 +1,13 @@
// ============================================================================
// CustomNPC-Plus — Root Project (Multi-Version Coordinator)
// ============================================================================
//
// This root project is a lightweight coordinator for the multi-version build.
// It does NOT apply the GTNH convention plugin or RetroFuturaGradle directly.
// The GTNH settings convention plugin (applied in settings.gradle) requires
// buildscript repositories to be available for plugin resolution.
//
// Subprojects:
// :platform-api — MC-free interfaces (plain Java 8 library)
// :core — MC-free game logic (plain Java 8 library, depends on platform-api)
// :mc1710 — Minecraft 1.7.10 Forge mod (GTNH convention + RFG, depends on core)
//
// Build commands:
// ./gradlew build — Build all modules
// ./gradlew :mc1710:build — Build only the MC 1.7.10 module
// ./gradlew :mc1710:runClient — Run the MC 1.7.10 client
// ./gradlew :mc1710:runServer — Run the MC 1.7.10 server
// ============================================================================
// CustomNPC-Plus — Root Project (Multi-Version Aggregator)
// Plain Gradle project that aggregates submodules.
// Each submodule (mc1710, mc1122, etc.) handles its own configuration.
buildscript {
repositories {
maven {
name "GTNH Maven"
url "https://nexus.gtnewhorizons.com/repository/public/"
}
gradlePluginPortal()
mavenCentral()
}
// IntelliJ IDEA triggers 'processIdeaSettings' on the root project during Gradle sync.
// The GTNH convention plugin only registers this task on subprojects that apply it,
// so we register a no-op task here to prevent "task not found" errors.
tasks.register('processIdeaSettings') {
group = 'ide'
description = 'No-op task for IntelliJ IDEA Gradle sync compatibility'
}
// IDEA plugin at root level is required for GTNH convention's IdeIntegrationModule
+21 -10
View File
@@ -1,12 +1,11 @@
pluginManagement {
// resolutionStrategy {
// eachPlugin {
// if(requested.id.toString() == "dts.typescript-generator") {
// useModule("com.github.bigguy345:dts-gradle-plugin:95b8ab4")
// }
// }
// }
//
// Default plugin versions so submodules can use 'id' without specifying version.
// The gtnhconvention plugin (and its bundled RetroFuturaGradle) is resolved here once
// so all submodules share the same classloader — required by Gradle build services.
plugins {
id 'com.gtnewhorizons.gtnhconvention' version '1.0.27'
}
repositories {
maven { url "https://jitpack.io"}
maven {
@@ -24,8 +23,20 @@ pluginManagement {
}
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
// Load the GTNH convention plugin into the settings classloader so all submodules
// share the same RetroFuturaGradle classes (required for Gradle build services).
buildscript {
repositories {
maven {
name "GTNH Maven"
url "https://nexus.gtnewhorizons.com/repository/public/"
}
gradlePluginPortal()
mavenCentral()
}
dependencies {
classpath 'com.gtnewhorizons:gtnhgradle:1.0.27'
}
}
// Include the local gradle-plugins composite build so plugin is resolved locally