-
-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major cleanup, use Gradle properties and providers (#794)
* Cleanup buildscript and dependencies - Set wrapper task version in buildscript to 7.0.2 - Remove jcenter and gradle libs repositories - Update to cadixdev.licenser plugin 0.6.0, ben-manes.versions plugin 0.39.0, srgutils 0.4.3 - Remove commented out shadow plugin - Remove lzma-java and javaxdelta library LZMA-java and javaxdelta was used for creating binary patches, which is now done using Forge's BinaryPatcher tool. * Standardize tasks subpackages to `tasks` instead of `task` * Standardize tasks names by removing `Task` affixes * Convert tasks to use lazy task properties Also cleanup imports in affected files, and converts ReobfuscateJar to be a subclass of JarExec. * Convert extensions to use lazy properties * Cleanup plugin logic to use lazy properties more smartly Most of the changes do not move any code, but instead cleanup the existing code in place. * Move environment checks to separate class outside of Utils * Make MCPFunction serializable Fixes issue where Gradle couldn't serialize a property with MCPFunctions. * Cleanup Patcher and Userdev plugins * Change group for run tasks to 'ForgeGradle runs' This is more descriptive than 'fg_runs', and will look better in the tasks list. * Move download utility functions from Utils to separate class * Modify Util#createRunConfigTasks to use task providers * Add manual property fields for properties with setters Gradle doesn't manage properties which have a non-abstract setter, so we have to provide the property ourselves. * Remove deprecated method in MojangLicenseHelper * Cleanup Artifact and HashFunction classes * Add package-infos with NonnullApi nullability annotation * Cleanup and add nullable annotations to util classes * Cleanup and add nullability annotations to deobf, mcp, repo, and config classes * Cleanup and simplify parts of regexes * Fix compilation error undetected by IDE * Ensure binary patches tasks run after patch generation task * Define gradle plugins using `gradlePlugin` block * Add jar artifact to pluginMaven publication manually Somehow, using the gradlePlugins block and disabling the automated publishing removed the jar artifact from the pluginMaven publication * Apply code review suggestions from @pupnewfster Also adds a few additional nullability annotations. * Update to Gradle 7.1, Licenser plugin 6.1 * Remove uses of deprecated code Notably, Gradle 8 is moving towards removal of Conventions in favor of Extensions. Most of the deprecation warnings are from `Project#getConvention()` and `JavaPluginConvention`, which has been replaced by `JavaPluginExtension`. * Use automated publishing once more * Disable automated publishing once more * Add helper methods for adding access transformers Since this is a user-facing extension, and access transformers are commonly used by modders, this eases the upgrade path from FG4 to FG5. Equivalent helpers are not added for sided annotation strippers, as these are not meant for normal modder use. * Mark classpath property in JarExec with proper annotation * Fix incorrect method call * Fix source and target compatibility with JarExec * Fix replaceArgs bug * Update SpecialSource * Use SRGUtils instead of manual parsing * Use `named()` to retrieve tasks * Update EnvironmentChecks#checkEnvironment javadoc * Update JavadocAdder to use google commons `Lists` * Allow setting the runtime java version for JarExec
- Loading branch information
Showing
105 changed files
with
3,785 additions
and
4,234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/common/java/net/minecraftforge/gradle/common/config/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* ForgeGradle | ||
* Copyright (C) 2018 Forge Development LLC | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 | ||
* USA | ||
*/ | ||
|
||
@NonNullApi | ||
package net.minecraftforge.gradle.common.config; | ||
|
||
import org.gradle.api.NonNullApi; |
Oops, something went wrong.