Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix]: Many tiny bugs #232

Merged
merged 39 commits into from
Aug 11, 2024
Merged

[Fix]: Many tiny bugs #232

merged 39 commits into from
Aug 11, 2024

Conversation

marchermans
Copy link
Contributor

@marchermans marchermans commented Jul 28, 2024

Warning

This update requires Gradle 8.8

TLDR:

This fixes many tiny bugs reported over the last 2 months, particularly when people are using version catalogues, also introduces support for RenderNurse.

New Features:

  • RenderDoc support via RenderNurse. Start RenderDoc automatically when starting your client game
  • NeoGradleProblemReporter -> Uses Gradle 8.8 reporting feature to warn the user of problems, which either prevent further setup or use of deprecated features
  • SourceSets provide quick methods to either depend entirely on a different sourceset (depends.on) or just inherit its compile and runtime classpath (inherits.from) replacing common code that modders used across all code bases.
  • Running and compiling with IDEA is now supported. A default test configuration can be configured on a project bases, to ensure that you can start a test from the gutter. This can be configured form the idea.unitTests block. The reconfiguration is only performed if the relevant conventions are enabled. See the new readme.md
  • Configuring JUnitRuns is now supported, this allows on IDEA to sync an IDE test environment run (as if it is a specific Unit test run) over. The IDEA extension now also offers abilities to reconfigure the testing targets, based on class, methods etc.
  • Runs can now inherit from each other not just from run types. See readme for further documentation
  • NeoGradle internally keeps track of its version, so it can create documentation links

Refactors:

  • Moved most of the complicated business logic from the CommonProjectPlugin to dedicated classes that describe what is happening:
    • AccessTransformer publishing
    • Convention configuration
  • Make runs and run types have a proper manager implementation, while also keeping the NDOC as public API registered in the extension
  • Clean will not clean the cache automatically anymore
  • CentralCacheService has been rewritten to support multistage cacheable tasks. Now caches:
    • Asset downloading
    • Library extraction, downloading and listing
    • JST Mapping apply
  • IdeManagement can now take a none-lazy post import task to run
  • IdeManagement now uses a dedicated task type for post sync execution
  • IdeManagement now passes in the root project for the sync action
  • WithEnabledProperty (used as base type for some convention DSL elements), now properly respects the enabled state and uses default values when the convention subsystem layer is disabled
  • WithPropertyLookup (root base type for convention DSL elements), now supports passing in default values for properties
  • The Dependency Replacement Logic will pre-allocate configuration of dependencies that it will replace. Doing a double check to ensure that the configuration of the target sourcesets runtimeOnly configuration actually exists, after it now was created earlier on during sourceset registration. Prevents issues with VersionCatalogues lazy resolve causing configuration creation during configuration resolve
  • The Dependency Replacement Logic now properly registered replacement handlers before registering the replacement logic to existing configurations.
  • The Dependency Replacement Logic will now properly detect SDKs from replacement targets and register them to the target sourceset sdk configurations.
  • Conventions for whether DevLogin and the new RenderDoc run systems are enabled on client runs are moved to the conventions subsystem
  • During an IDE import, all sourcesets runtime and compile classpaths are resolved (it happens later on anyway, so just pulls this a bit forward), ensures that VersionCatalogues lazy dependencies are properly instantiated and registered.
  • IDEA Runs (when set to compile and run with IDEA) will now pull their resources from a centralized prepared directory to ensure that all resources are processed. This processing and preparing is done by the inteliJCopyXXX tasks, where XXX is the usual sourceset identifier (and empty for the mains sourceset)
  • Hashing supports directory hashing now
  • RunUtils now properly supports dealing with IDEA, eclipse and other IDEs
  • Test SourceSets are not automatically added to runs anymore based on the main sourceset property, they now have their own convention property, which is false by default.

Deprecations:

  • Run#getProgramArguments() -> Run.getArguments(), pulls it inline with the RunType. Creates a Problem report when used.

Removals:

  • ExtensionManager, it is no longer possible to replace extension implementation types for downstream consumers
  • RunConstants -> Use the relevant RunManager and RunTypeManager types to get the rightly typed NDOCs for Runs and RunTypes

@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Jul 28, 2024

  • Publish PR to GitHub Packages

Last commit published: 7b930f681ee1a95db92c98e3c8168f79e990413f.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #232' // https://github.com/neoforged/NeoGradle/pull/232
        url 'https://prmaven.neoforged.net/NeoGradle/pr232'
        content {
            includeModule('net.neoforged.gradle', 'neoform')
            includeModule('net.neoforged.gradle', 'dsl-mixin')
            includeModule('net.neoforged.gradle', 'utils')
            includeModule('net.neoforged.gradle', 'dsl-platform')
            includeModule('net.neoforged.gradle', 'userdev')
            includeModule('net.neoforged.gradle', 'dsl-neoform')
            includeModule('net.neoforged.gradle.vanilla', 'net.neoforged.gradle.vanilla.gradle.plugin')
            includeModule('net.neoforged.gradle', 'common')
            includeModule('net.neoforged.gradle.userdev', 'net.neoforged.gradle.userdev.gradle.plugin')
            includeModule('net.neoforged.gradle', 'test-utils')
            includeModule('net.neoforged.gradle.common', 'net.neoforged.gradle.common.gradle.plugin')
            includeModule('net.neoforged.gradle', 'vanilla')
            includeModule('net.neoforged.gradle.neoform', 'net.neoforged.gradle.neoform.gradle.plugin')
            includeModule('net.neoforged.gradle.mixin', 'net.neoforged.gradle.mixin.gradle.plugin')
            includeModule('net.neoforged.gradle', 'dsl-userdev')
            includeModule('net.neoforged.gradle', 'dsl-vanilla')
            includeModule('net.neoforged.gradle', 'platform')
            includeModule('net.neoforged.gradle', 'mixin')
            includeModule('net.neoforged.gradle.platform', 'net.neoforged.gradle.platform.gradle.plugin')
            includeModule('net.neoforged.gradle', 'dsl-common')
        }
    }
}

@marchermans marchermans enabled auto-merge (squash) August 11, 2024 16:54
@marchermans marchermans merged commit 47be513 into NG_7.0 Aug 11, 2024
108 checks passed
@marchermans marchermans deleted the fix/no-recompile branch August 11, 2024 17:11
@neoforged-releases
Copy link

🚀 This PR has been released as NeoGradle version 7.0.158.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant