{"id":51172799,"url":"https://github.com/neoforged/ModDevGradle","last_synced_at":"2026-08-03T14:00:33.140Z","repository":{"id":241376832,"uuid":"805045814","full_name":"neoforged/ModDevGradle","owner":"neoforged","description":"A Gradle plugin for developing Minecraft mods using NeoForge","archived":false,"fork":false,"pushed_at":"2026-06-23T00:23:57.000Z","size":1035,"stargazers_count":101,"open_issues_count":21,"forks_count":32,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-06-23T02:14:07.372Z","etag":null,"topics":["minecraft","moddevgradle","modding","neoforge"],"latest_commit_sha":null,"homepage":"https://projects.neoforged.net/neoforged/moddevgradle","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neoforged.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"neoforged","open_collective":"neoforged"}},"created_at":"2024-05-23T19:21:21.000Z","updated_at":"2026-06-16T19:29:32.000Z","dependencies_parsed_at":"2024-05-28T03:23:15.176Z","dependency_job_id":"56e7e374-fb3f-4add-8d9d-12a0bddcab1e","html_url":"https://github.com/neoforged/ModDevGradle","commit_stats":{"total_commits":250,"total_committers":10,"mean_commits":25.0,"dds":0.376,"last_synced_commit":"524ca0684e5877b38fdc183560608a0c1d5aa6fe"},"previous_names":["neoforged/moddevgradle"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/neoforged/ModDevGradle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoforged%2FModDevGradle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoforged%2FModDevGradle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoforged%2FModDevGradle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoforged%2FModDevGradle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neoforged","download_url":"https://codeload.github.com/neoforged/ModDevGradle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoforged%2FModDevGradle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36238395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-08-03T02:00:06.975Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["minecraft","moddevgradle","modding","neoforge"],"created_at":"2026-06-27T02:00:25.208Z","updated_at":"2026-08-03T14:00:33.066Z","avatar_url":"https://github.com/neoforged.png","language":"Java","funding_links":["https://github.com/sponsors/neoforged","https://opencollective.com/neoforged"],"categories":["Development"],"sub_categories":["IDE Plugins and Project Templates"],"readme":"# Gradle Plugin for Developing Minecraft Mods on NeoForge\n\n![ModDevGradle Logo](assets/moddevgradle_logo.svg)\n\nCheck the NeoForged Project Listing for [latest releases](https://projects.neoforged.net/neoforged/ModDevGradle).\n\nIf you are updating to a new major version of the plugin, refer to the [list of breaking changes](BREAKING_CHANGES.md).\n\n## Features\n\n- Uses the latest Gradle best practices and is compatible with Gradle 8.8\n- Creates the necessary artifacts to compile Minecraft mods for [NeoForge](https://neoforged.net/)\n- Runs the game from Gradle or IntelliJ for debugging and testing\n- Automatically creates and uses a development-friendly logging configuration for the testing the mod\n- Supports the [Gradle configuration cache](https://docs.gradle.org/current/userguide/configuration_cache.html) to speed\n  up repeated runs of Gradle tasks\n\n## Basic Usage for NeoForge Mods\n\nIn `gradle.properties`:\n\n```properties\n# Enable Gradle configuration cache if you'd like:\norg.gradle.configuration-cache=true\n```\n\nIn `settings.gradle`:\n\n```groovy\nplugins {\n    // This plugin allows Gradle to automatically download arbitrary versions of Java for you\n    id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'\n}\n```\n\nIn `build.gradle`:\n\n```groovy\nplugins {\n    // Apply the plugin. You can find the latest version at https://projects.neoforged.net/neoforged/ModDevGradle\n    id 'net.neoforged.moddev' version '1.0.11'\n}\n\nneoForge {\n    // We currently only support NeoForge versions later than 21.0.x\n    // See https://projects.neoforged.net/neoforged/neoforge for the latest updates\n    version = \"21.0.103-beta\"\n    \n    // Validate AT files and raise errors when they have invalid targets\n    // This option is false by default, but turning it on is recommended\n    validateAccessTransformers = true\n\n    runs {\n        client {\n            client()\n        }\n        data {\n            data()\n        }\n        server {\n            server()\n        }\n    }\n\n    mods {\n        testproject {\n            sourceSet sourceSets.main\n        }\n    }\n}\n```\n\nSee the example code in [the test project](./testproject/build.gradle).\n\n## Vanilla-Mode\n\nIn multi-loader projects, you'll often need a subproject for your cross-loader code. This project will also need\naccess to Minecraft classes, but without any loader-specific extensions.\n\nThis plugin solves that by offering a \"Vanilla-mode\" which you enable by\nspecifying a [NeoForm version](https://projects.neoforged.net/neoforged/neoform) instead of a NeoForge version.\nNeoForm contains the necessary configuration to produce Minecraft jar-files that you can compile against\nthat contain no other modifications.\n\nIn Vanilla-mode, only the `client`, `server` and `data` run types are supported.\nSince the plugin includes no mod loader code in this mode, only basic resource- and data packs will be usable in-game.\n\nIn `build.gradle`:\n\nApply the plugin as usual and use a configuration block like this:\n\n```groovy\nneoForge {\n    // Look for versions on https://projects.neoforged.net/neoforged/neoform\n    neoFormVersion = \"1.21-20240613.152323\"\n\n    runs {\n        client {\n            client()\n        }\n        server {\n            server()\n        }\n        data {\n            data()\n        }\n    }\n}\n```\n\n## Disabling Decompilation and Recompilation\nBy default, MDG will use the [NeoForm](https://github.com/neoforged/NeoForm) decompilation/recompilation pipeline to produce\nMinecraft sources and a matching compiled game jar. This leads to a great debugging experience, at the cost of longer setup times.\n\nAs of MDG 2.0.124, an alternative pipeline can be used, which will skip decompilation and recompilation entirely.\nAs of MDG 2.0.136, this pipeline will be used by default in CI/CD pipelines, if the `CI` environment variable is `true`.\nThis is true by default in many CI/CD systems such as GitHub Actions.\n\nTo control this setting manually, replace:\n```groovy\nneoForge {\n    version = \"...\" // or neoFormVersion = \"...\"\n}\n```\n\nBy:\n```groovy\nneoForge {\n    enable {\n        version = \"...\" // or neoFormVersion = \"...\"\n        disableRecompilation = true\n    }\n}\n```\n\n## Common Issues\n\n### Clicking \"Attach Sources\" does nothing when viewing a Minecraft class (IntelliJ IDEA)\nSometimes IntelliJ gets into a state where clicking \"Attach Sources\" while viewing a decompiled Minecraft class \nwill not work.\n\nReloading the Gradle Project and then clicking \"Attach Sources\" again will usually fix this problem.\n\n### Task `idePostSync` not found (IntelliJ IDEA)\nThis error typically happens when switching to ModDevGradle from another plugin with an `idePostSync` task.\nThis can be fixed by unregistering the task in IntelliJ IDEA, as follows:\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n1. Open the Gradle tool window on the right, and right-click the Gradle project.\n\n![](docs/idePostSync1.png)\n\n2. Click on `Tasks Activation`.\n\n![](docs/idePostSync2.png)\n\n3. Select the `idePostSync` task and delete it using the `-` button.\n\n![](docs/idePostSync3.png)\n\n4. Sync the Gradle project again.\n\n\u003c/details\u003e\n\n## More Configuration\n\n### Runs\n\nAny number of runs can be added in the `neoForge { runs { ... } }` block.\n\nEvery run must have a type. Currently, the supported types are `client`, `data`, `gameTestServer`, `server`.\nThe run type can be set as follows:\n\n```groovy\nneoForge {\n    runs {\n        \u003crun name\u003e {\n            // This is the standard syntax:\n            type = \"gameTestServer\"\n            // Client, data and server runs can use a shorthand instead:\n            // client()\n            // data()\n            // server()\n        \n            // Changes the working directory used for this run.\n            // The default is the 'run' subdirectory of your project\n            gameDirectory = project.file('runs/client')\n\n            // Add arguments passed to the main method\n            programArguments = [\"--arg\"]\n            programArgument(\"--arg\")\n\n            // Add arguments passed to the JVM\n            jvmArguments = [\"-XX:+AllowEnhancedClassRedefinition\"]\n            jvmArgument(\"-XX:+AllowEnhancedClassRedefinition\")\n\n            // Add system properties\n            systemProperties = [\n                    \"a.b.c\": \"xyz\"\n            ]\n            systemProperty(\"a.b.c\", \"xyz\")\n\n            // Set or add environment variables\n            environment = [\n                    \"FOO_BAR\": \"123\"\n            ]\n            environment(\"FOO_BAR\", \"123\")\n\n            // Optionally set the log-level used by the game\n            logLevel = org.slf4j.event.Level.DEBUG\n\n            // You can change the name used for this run in your IDE\n            ideName = \"Run Game Tests\"\n            \n            // You can disable a run configuration being generated for your IDE\n            disableIdeRun()\n            // ... alternatively you can set ideName = \"\"\n\n            // Changes the source set whose runtime classpath is used for this run. This defaults to \"main\"\n            // Eclipse does not support having multiple runtime classpaths per project (except for unit tests).\n            sourceSet = sourceSets.main\n\n            // Changes which local mods are loaded in this run.\n            // This defaults to all mods declared in this project (inside of mods { ... } ).\n            loadedMods = [mods.\u003cmod name 1\u003e, mods.\u003cmod name 2\u003e]\n\n            // Allows advanced users to run additional Gradle tasks before each launch of this run\n            // Please note that using this feature will significantly slow down launching the game\n            taskBefore tasks.named(\"generateSomeCodeTask\")\n        }\n    }\n}\n```\n\nPlease have a look at [RunModel.java](src/main/java/net/neoforged/moddevgradle/dsl/RunModel.java) for the list of\nsupported properties.\nHere is an example that sets a system property to change the log level to debug:\n\n```groovy\nneoForge {\n    runs {\n        configureEach {\n            systemProperty 'forge.logging.console.level', 'debug'\n        }\n    }\n}\n```\n\n### Jar-in-Jar\n\nTo embed external Jar-files into your mod file, you can use the `jarJar` configuration added by the plugin.\n\n#### External Dependencies\n\nWhen you want to bundle external dependencies, Jar-in-Jar has to be able to select a single copy of that dependency\nwhen it is bundled by multiple mods (possibly even in different versions). To support this scenario, you should set\na supported version range to avoid mod incompatibilities.\n\n```groovy\ndependencies {\n    jarJar(implementation(\"org.commonmark:commonmark\")) {\n        version {\n            // The version range your mod is actually compatible with. \n            // Note that you may receive a *lower* version than your preferred if another\n            // Mod is only compatible up to 1.7.24, for example, your mod might get 1.7.24 at runtime.\n            strictly '[0.1, 1.0)'\n            prefer '0.21.0' // The version actually used in your dev workspace\n        }\n    }\n}\n```\n\nVersion ranges use\nthe [Maven version range format](https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-DependencyVersionRanges):\n\n| Range         | Meaning                                                                       |\n|---------------|-------------------------------------------------------------------------------|\n| (,1.0]        | x \u003c= 1.0                                                                      |\n| 1.0           | **Soft** requirement on 1.0. It allows for **any** version.                   |\n| [1.0]         | Hard requirement on 1.0                                                       |\n| [1.2,1.3]     | 1.2 \u003c= x \u003c= 1.3                                                               |\n| [1.0,2.0)     | 1.0 \u003c= x \u003c 2.0                                                                |\n| [1.5,)        | x \u003e= 1.5                                                                      |\n| (,1.0],[1.2,) | x \u003c= 1.0 or x \u003e= 1.2. Multiple sets are comma-separated                       |\n| (,1.1),(1.1,) | This excludes 1.1 if it is known not to work in combination with this library |\n\n#### Local Files\n\nYou can also include files built by other tasks in your project, for example, jar tasks of other source sets.\n\nWhen wanting to build a secondary jar for a coremod or plugin, you could define a separate source set `plugin`,\nadd a jar task to package it and then include the output of that jar like this:\n\n```groovy\nsourceSets {\n    plugin\n}\n\n\nneoForge {\n    // ...\n    mods {\n        // ...\n        // To make the plugin load in dev\n        'plugin' {\n            sourceSet sourceSets.plugin\n        }\n    }\n}\n\ndef pluginJar = tasks.register(\"pluginJar\", Jar) {\n    from(sourceSets.plugin.output)\n    archiveClassifier = \"plugin\"\n    manifest {\n        attributes(\n                'FMLModType': \"LIBRARY\",\n                \"Automatic-Module-Name\": project.name + \"-plugin\"\n        )\n    }\n}\n\ndependencies {\n    jarJar files(pluginJar)\n}\n```\n\nWhen you include a jar file like this, we use its filename as the artifact-id and its MD5 hash as the version. \nIt will never be swapped out with embedded libraries of the same name, unless their content matches.\n\n#### Subprojects\n\nFor example, if you have a coremod in a subproject and want to embed its jar file, you can use the following syntax.\n\n```groovy\ndependencies {\n    jarJar project(\":coremod\")\n}\n```\n\nWhen starting the game, FML will use the group and artifact id of an embedded Jar-file to determine if the same file\nhas been embedded in other mods.\nFor subprojects, the group id is the root project name, while the artifact id is the name of the subproject.\nBesides the group and artifact id, the Java module name of an embedded Jar also has to be unique across all loaded\nJar files.\nTo decrease the likelihood of conflicts if no explicit module name is set,\nwe prefix the filename of embedded subprojects with the group id.\n\n### External Dependencies: Runs\nAs of Minecraft 1.21.9, external dependencies do not need special handling anymore to be loaded in runs.\n\n\u003cdetails\u003e\n\u003csummary\u003eShow information for 1.21.8 and older Minecraft versions\u003c/summary\u003e\n\nExternal dependencies will only be loaded in your runs if they are mods (with a `META-INF/neoforge.mods.toml` file),\nor if they have the `FMLModType` entry set in their `META-INF/MANIFEST.MF` file.\nUsually, Java libraries do not fit either of these requirements,\nleading to a `ClassNotFoundException` at run time when you try to call them from your mod.\n\nTo fix this, the library needs to be added to the `additionalRuntimeClasspath` as follows:\n```groovy\ndependencies {\n    // This is still required to add the library in your jar and at compile time.\n    jarJar(implementation(\"org.commonmark:commonmark\")) { /* ... */ }\n    // This adds the library to all the runs.\n    additionalRuntimeClasspath \"org.commonmark:commonmark:0.21.0\"\n}\n```\n\n_Advanced_: The additional runtime classpath can be configured per-run.\nFor example, to add a dependency to the `client` run only, it can be added to `clientAdditionalRuntimeClasspath`.\n\u003c/details\u003e\n\n### Isolated Source Sets\n\nIf you work with source sets that do not extend from `main`, and would like the modding dependencies to be available\nin those source sets, you can use the following api:\n\n```\nsourceSets {\n  anotherSourceSet // example\n}\n\nneoForge {\n  // ...\n  addModdingDependenciesTo sourceSets.anotherSourceSet\n  \n  mods {\n    mymod {\n      sourceSet sourceSets.main\n      // Do not forget to add additional source-sets here!\n      sourceSet sourceSets.anotherSourceSet\n    }\n  }\n}\n\ndependencies {\n  implementation sourceSets.anotherSourceSet.output\n}\n```\n\n### Better Minecraft Parameter Names / Javadoc (Parchment)\n\nYou can use community-sourced parameter-names and Javadoc for Minecraft source code\nfrom [ParchmentMC](https://parchmentmc.org/docs/getting-started).\n\nThe easiest way is setting the Parchment version in your gradle.properties:\n\n```properties\nneoForge.parchment.minecraftVersion=1.21\nneoForge.parchment.mappingsVersion=2024.06.23\n```\n\nAlternatively, you can set it in your build.gradle:\n\n```groovy\nneoForge {\n    // [...]\n\n    parchment {\n        // Get versions from https://parchmentmc.org/docs/getting-started\n        // Omit the \"v\"-prefix in mappingsVersion\n        minecraftVersion = \"1.20.6\"\n        mappingsVersion = \"2024.05.01\"\n    }\n}\n```\n\n### Unit testing with JUnit\n\nOn top of gametests, this plugin supports unit testing mods with JUnit.\n\nFor the minimal setup, add the following code to your build script:\n\n```groovy\n// Add a test dependency on the test engine JUnit\ndependencies {\n    testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'\n    testRuntimeOnly 'org.junit.platform:junit-platform-launcher'\n}\n\n// Enable JUnit in Gradle:\ntest {\n    useJUnitPlatform()\n}\n\nneoForge {\n    unitTest {\n        // Enable JUnit support in the moddev plugin\n        enable()\n        // Configure which mod is being tested.\n        // This allows NeoForge to load the test/ classes and resources as belonging to the mod.\n        testedMod = mods.\u003cmod name \u003e // \u003cmod name\u003e must match the name in the mods { } block.\n        // Configure which mods are loaded in the test environment, if the default (all declared mods) is not appropriate.\n        // This must contain testedMod, and can include other mods as well.\n        // loadedMods = [mods.\u003cmod name \u003e, mods.\u003cmod name 2\u003e]\n    }\n}\n```\n\nYou can now use the `@Test` annotation for your unit tests inside the `test/` folder,\nand reference Minecraft classes.\n\n#### Loading a server\n\nWith the NeoForge test framework, you can run your unit tests in the context of a Minecraft server:\n\n```groovy\ndependencies {\n    testImplementation \"net.neoforged:testframework:\u003cneoforge version\u003e\"\n}\n```\n\nWith this dependency, you can annotate your test class as follows:\n\n```java\n@ExtendWith(EphemeralTestServerProvider.class)\npublic class TestClass {\n    @Test\n    public void testMethod(MinecraftServer server) {\n        // Use server...\n    }\n}\n```\n\n### Centralizing Repositories Declaration\n\nThis plugin supports\nGradle's [centralized repositories declaration](https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:centralized-repository-declaration)\nin settings.gradle\nby offering a separate plugin to apply the repositories to develop mods.\nIt can be used in the following way in `settings.gradle`:\n\n```groovy\nplugins {\n    id 'net.neoforged.moddev.repositories' version '\u003cversion\u003e'\n}\n\ndependencyResolutionManagement {\n    repositories {\n        mavenCentral()\n    }\n}\n```\n\nPlease note that defining any repository in build.gradle will completely disable\nthe centrally managed repositories for that project.\nYou can also use the repositories plugin in a project to add the repositories there,\neven if dependency management has been overridden.\n\n### Access Transformers\n\nAccess Transformers are an advanced feature allowing mods to relax the access modifiers on Minecraft classes,\n fields, and methods.\n\nTo use this feature, you can place an access transformer data file at `src/main/resources/META-INF/accesstransformer.cfg`,\nadhering to the [access transformer format](https://docs.neoforged.net/docs/advanced/accesstransformers/).\n\n**When you use the default file location, you do not need to configure anything.**\n\nIf you'd like to use additional or different access transformer files, you can modify the paths MDG reads them from\nby setting the `accessTransformers` property.\n\n\u003e [!IMPORTANT]\n\u003e If you do not use the default path, you have to also modify your neoforge.mods.toml and configure the paths.\n\u003e Please see the [NeoForge documentation](https://docs.neoforged.net/docs/advanced/accesstransformers/) for details.\n\nThe elements are in the same format that `project.files(...)` expects.\n\n```groovy\nneoForge {\n    // Pulling in an access transformer from the parent project\n    // (Option 1) Add a single access transformer, and keep the default:\n    accessTransformers.from \"../src/main/resources/META-INF/accesstransformer.cfg\"\n    // (Option 2) Overwrite the whole list of access transformers, removing the default:\n    accessTransformers = [\"../src/main/resources/META-INF/accesstransformer.cfg\"]\n}\n```\n\nIn addition, you can add additional access transformers to the `accessTransformers` configuration using normal\nProject dependency syntax in your dependencies block.\n\n#### Publication of Access Transformers\nOptionally, access transformers can be published to a Maven repository so they are usable by other mods.\nTo publish an access transformer, add a `publish` declaration as follows:\n```groovy\nneoForge {\n    accessTransformers {\n        publish file(\"src/main/resources/META-INF/accesstransformer.cfg\")\n    }\n}\n```\n\nIf there is a single access transformer, it will be published under the `accesstransformer` classifier.\nIf there are multiple, they will be published under the `accesstransformer1`, `accesstransformer2`, etc... classifiers.\n\nTo consume an access transformer, add it as an `accessTransformers` dependency.\nThis will find all the published access transformers regardless of their file names.\nFor example:\n```groovy\ndependencies {\n    accessTransformers \"\u003cgroup\u003e:\u003cartifact\u003e:\u003cversion\u003e\"\n}\n```\n\n### Interface Injection\n\nInterface injection is an advanced feature allowing mods to add additional interfaces to Minecraft classes and interfaces\nat development time. This feature requires that mods use ASM or Mixins to make the same extensions at runtime.\n\nTo use this feature, place an [interface injection data-file](https://github.com/neoforged/JavaSourceTransformer?tab=readme-ov-file#interface-injection) in your project and configure the `interfaceInjectionData` property to include it.\nSince this feature only applies at development time, you do not need to include this data file in your jar.\n\n\u003e [!IMPORTANT]\n\u003e This feature only applies at development time. You need to use Mixins or Coremods to make it work at runtime.\n\n`build.gradle`\n```groovy\nneoForge {\n    interfaceInjectionData.from \"interfaces.json\"\n}\n```\n\n`interfaces.json`\n```json\n{\n  \"net/minecraft/world/item/ItemStack\": [\n    \"testproject/FunExtensions\"\n  ]\n}\n```\n\nIn addition, you can add additional data-files to the `interfaceInjectionData` configuration using normal\nProject dependency syntax in your dependencies block.\n\n#### Publication of Interface Injection Data\nThe publication of interface injection data follows the same principles as the publication of access transformers.\n\nIf there is a data file, it will be published under the `interfaceinjection` classifier.\nIf there are multiple, they will be published under the `interfaceinjection1`, `interfaceinjection2`, etc... classifiers.\n\n```groovy\n// Publish a file:\nneoForge {\n    interfaceInjectionData {\n        publish file(\"interfaces.json\")\n    }\n}\n// Consume it:\ndependencies {\n    interfaceInjectionData \"\u003cgroup\u003e:\u003cartifact\u003e:\u003cversion\u003e\"\n}\n```\n\n### Using Authenticated Minecraft Accounts\nMinecraft runs normally use an offline user profile in a development environment.  \nIf you want to run the game with your real user profile, you may do so using [DevLogin](https://github.com/covers1624/DevLogin) by setting\nthe `devLogin` property of a client run to `true`:\n\n```groovy\nneoForge {\n    runs {\n        // Add a second client run that is authenticated\n        clientAuth {\n            client()\n            devLogin = true\n        }\n    }\n}\n```\n\nThe first time you launch the authenticated run you will be asked in the console to visit https://www.microsoft.com/link and enter\nthe given code. More information is available on the [DevLogin readme](https://github.com/covers1624/DevLogin)\n\n## Advanced Tips \u0026 Tricks\n\n### Overriding Platform Libraries\n\nFor testing during the development of NeoForge and its various platform libraries, it can be useful to globally\noverride the version to an unreleased one. This works:\n\n```groovy\nconfigurations.all {\n    resolutionStrategy {\n        force 'cpw.mods:securejarhandler:2.1.43'\n    }\n}\n```\n\n### Requesting Additional Minecraft Artifacts\n\nThe NeoForm process executed to create the Minecraft jars contains additional intermediate results, which may be useful in advanced build scripts.\n\nYou can request those results to be written to specific output files by using the `additionalMinecraftArtifacts` property.\n\nWhich results are available depends on the NeoForm/NeoForge and NFRT versions used. (See below to pin the NFRT version.)\n\n```groovy\nneoForge {\n    // Request NFRT to write additional results to the given locations\n    // This happens alongside the creation of the normal Minecraft jar\n    additionalMinecraftArtifacts.put('vanillaDeobfuscated', project.file('vanilla.jar'))\n}\n```\n\n### Global Settings for NFRT\n\n```groovy\nneoFormRuntime {\n    // Use a specific NFRT version\n    // Gradle Property: neoForge.neoFormRuntime.version\n    version = \"1.2.3\"\n\n    // Control use of cache\n    // Gradle Property: neoForge.neoFormRuntime.enableCache\n    enableCache = false\n\n    // Enable Verbose Output\n    // Gradle Property: neoForge.neoFormRuntime.verbose\n    verbose = true\n\n    // Use Eclipse Compiler for Minecraft\n    // Gradle Property: neoForge.neoFormRuntime.useEclipseCompiler\n    useEclipseCompiler = true\n\n    // Print more information when NFRT cannot use a cached result\n    // Gradle Property: neoForge.neoFormRuntime.analyzeCacheMisses\n    analyzeCacheMisses = true\n    \n    // Overrides the launcher manifest URL used by NFRT to look up Minecraft versions\n    // Gradle Property: neoForge.neoFormRuntime.launcherManifestUrl\n    launcherManifestUrl = \"https://.../version_manifest_v2.json\"\n}\n```\n\n### Running Tasks on IDE Project Synchronization\n\nYou can add tasks to be run when the IDE reloads your Gradle project. \nAdvanced users might find this useful to run code generation tasks whenever the IDE syncs the project.\n\n```\nneoForge {\n    ideSyncTask tasks.named(\"generateSomeCodeTask\")\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoforged%2FModDevGradle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneoforged%2FModDevGradle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoforged%2FModDevGradle/lists"}