master Changelog 1.0-pre ======= - 0.0-pre-81 Add provider-friendly methods to extensions - 0.0-pre-80 Fix changelog gradle failing to build - 0.0-pre-79 Update buildscript, fix lingering problems - 0.0-pre-78 Fix createChangelog failing to run I forgot to use location only on the output property - 0.0-pre-77 Update GradleUtils Shared to fix various issues - 0.0-pre-76 Added some gradle properties Properties used by Forge's Gradle plugins can be set either in the `gradle.properties` file or as a system property, with precedence given to the former. Both are checked, mostly to aid the usage of CI systems. All properties are disabled by default `net.minecraftforge.gitversion.log.version` - Enabled if set to `true`. - Logs the project's version after evaluation. - This uses the project's logger, so Gradle knows to keep the logged version under the "Configure project :(project)" for the project it's writing it for. - 0.0-pre-75 Fix projects without 'assemble' failing build when declaring changelogs Also: converted majority of Groovy to Java. Git Version Gradle still has some implementations in Groovy since it is cleaner to do so than it would be in Java. - 0.0-pre-74 Bump GradleUtils Shared to fix potential serialization issues - 0.0-pre-73 Fix not declaring promotion secrets - 0.0-pre-72 Attempt to promote artifact from Gradle If this works then we're gaming - 0.0-pre-71 gradle-3.0 - Split from GradleUtils into dedicated plugins Release notes: https://gist.github.com/Jonathing/c96051409fcdef58cc51bea8b2b7d4af - 0.0-pre-70 Fix usage of incorrect BuildLayout There's two of them, both marked as an `@Service`. One of them is internal. I was using the internal one. Thank you Gradle. - 0.0-pre-69 Optimize usage of Git Version plugin in settings.gradle If `net.minecraftforge.gitversion` is applied in `settings.gradle(.kts)`, the `gitversion` extension is added to both the `Settings` and `Gradle` objects. Subprojects can access `gradle.gitversion` (or `gradle.extensions.findByType(GitVersionExtension)` with an import statement) to access the root project's version for free. Additionally, all projects in the build will inherit the version (`gitversion.tagOffset) found by Git Version (see `Gradle#beforeProject`). Projects that apply the plugin will first check if `project.layout.projectDirectory` is the same as `buildLayout.rootDirectory`. If it is and the Gradle instance has a `gitversion` extension, it is directly added to the project without recreating it. This avoids the need to call Git Version multiple times just to get the same version. Extremely useful for subprojects that do not need to calculate their own version number. - 0.0-pre-68 changelog.publishAll no longer affects subprojects by default Publishing the changelog to subprojects can still be done this way: ```groovy changelog { fromBase() publishAll = true includeSubprojects = true // NEW! } ``` The only projects I believe need this are Forge and Bootstrap. - 0.0-pre-67 Use `.gitversion.toml` instead of `.gitversion` Forcing the `.toml` extension enabled TOML support in editors, and allows us to create a schema that can be used for it in the future. `.gitversion` will no longer work in the next GV plugin build, but will continue to work for GradleUtils 2.x. - 0.0-pre-66 Bump Git Version to 0.7.1 - 0.0-pre-65 Fix issues with multiple filters not resolving the git log correctly yeah - 0.0-pre-64 Bump Git Version to 0.7.0 - 0.0-pre-63 Fix subprojects failing to publish changelogs Temporarily disabled changelog gen for this build so that it will work. - 0.0-pre-62 Add experimental "include" and "exclude" config options Allows adding multiple paths that may be included or excluded from a subproject's version number or changelog calculation. It does *not* affect how other projects calculate their version numbers, unlike how projects automatically exclude all subprojects from version number calculation. ```toml [gradlePlugin] path = "gradle-plugin" include = [ "settings.gradle" ] exclude = [ "gradle-plugin/build.gradle" ] ``` Open to feedback. As a reminder, Git Version has not reached 1.0.0 yet and is thus still effectively a beta. - 0.0-pre-61 Remove #getSubprojectPaths() because they can be done by the consumer Too much API - 0.0-pre-60 Convert some interfaces to final classes Originally did this to make things easier to write, but after a few months I've come to realize that yeah keeping them as utility classes is just better. - 0.0-pre-59 Allow config file ".gitversion.toml" - 0.0-pre-58 Update workflows to account for project restructuring - 0.0-pre-57 Split off GitVersion and Changelog plugins into two separate jars The Changelog plugin now exists in `:gitversion-gradle:changelog-gradle`. This was done because the GitVersion plugin can be applied onto any type (including settings) while Changelog can only be applied onto projects. If a consumer were to apply the GV plugin in `settings.gradle` and then later apply the Changelog plugin in `build.gradle`, it could cause an error where the plugin could already be on the classpath with an unknown version. The only code shared by these two projects is a single class `GitVersionTools` that has the definition for the tool to download and invoke. This has been split off into `:gitversion-gradle:common` and is shadowed by both projects. - 0.0-pre-56 Move CLI entry into a separate sourceSet - 0.0-pre-55 Split CLI into subproject (see desc) I am going to change it to a sourceSet but wanted to save this commit regardless as a reference point - 0.0-pre-54 Fix actions workflow using wrong Gradle project name - 0.0-pre-53 Migrate buildscript to GU3, dogfood GV3 on root project - 0.0-pre-52 Bundle shared base with GV3 - 0.0-pre-51 Fix task dependencies for copyChangelog in subprojects - 0.0-pre-50 Allow plugin to be applied on settings.gradle - 0.0-pre-49 Fix CopyChangelog failing to execute Missed an `@Internal` annotation - 0.0-pre-48 More cleanup, (try to) get shadow jar working again - 0.0-pre-47 Account for recent change in GradleUtils https://github.com/MinecraftForge/GradleUtils/commit/7b5fda38c36d22e2300af7babeb190d6dc257217 - 0.0-pre-46 Add --output flag to output info to file instead of stdout - 0.0-pre-45 Fix implementation issue with GenerateChangelog - 0.0-pre-44 Fix configuration cache issues This one's a bit weird. Gradle stores *the effects* of providers in order to execute them without needing to configure the project. However, in order to get the execution path for the Java launcher, we need access to the JavaToolchainService, which is usually injected at configuration. The problem is that this service is not available if we are skipping configuration (i.e. configuration cache). The solution is to not worry about setting a Java launcher executable path. This plugin requires Gradle 9 which itself requires Java 17. Git Version is built using Java 17. We can count on the daemon JVM being at least version 17 and don't need to worry about setting the Java launcher in the JavaExec spec ourselves. - 0.0-pre-43 Fix Git Version value source eagerly resolving toolchain - 0.0-pre-42 Account for an issue with method refernces in Groovy Method refernces (::) and pointers (.&) to private methods when used as a closure cause illegal access issues. - 0.0-pre-41 Fixed some silly mistakes that caused resolution errors - 0.0-pre-40 Update Foojar Resolver Convention to fix builds 0.10.0 is incompatible with Gradle 9 due to a refernce in Gradle 8 that no longer exists. - 0.0-pre-39 Fix workflow paths, increment build numbers - 0.0-pre-38 Comment stubs to get the plugin building - 0.0-pre-37 Bump Gradle to 9.0.0 Might fix weird issues with the environment variables - 0.0-pre-36 Update plugin publish name - 0.0-pre-35 Add Stacktrace - 0.0-pre-34 Fix use of local libraries, use Git Version 0.6.1 - 0.0-pre-33 Temporarily disable publishing to plugin portal Actions workflow doesn't have the secret keys for it yet, but I need to start testing now. - 0.0-pre-32 0.6 - Dedicated Gradle plugin, Changelog from CLI, API restructuring (#2) - 0.0-pre-31 Update buildscript, Gradle 8.14.3 - 0.0-pre-30 Manually declare the fatjar as requiring Java 17 For some reason, the ShadowJar plugin doesn't automatically use the same JVM version attribute from the Jar task. This can lead to consumers accidentally resolving the fat-jar instead of the main jar if their language version is incorrectly set or behaving weirdly. Working around this by manually specifying J17 in the shadowRuntimeElements configuration. - 0.0-pre-29 Add missed license header - 0.0-pre-28 Buildscript cleanup, change artifact name to remove dash - 0.0-pre-27 Do not expose SystemReader object in GitVersion#disableSystemConfig - 0.0-pre-26 Fix changelog including tag prefix in version numbers - 0.0-pre-25 Enforce stricter tag prefix standard - 0.0-pre-24 Preliminary support for tag suffixes Instead of adding some more convoluted and additional code to Git Version specifically to handle tags with suffixes, it instead now uses a new approach when handling tag prefix. tl;dr default filter `*-*` is now `[[:digit"]]**`. Even since before Git Version, it was established through the use of `Character#isDigit` that all tags should, in some way, include a valid number to convey the version. Prior to Git Version 0.4, when checking for tags without a tag prefix, the filter would simply check if the tag didn't have any dashes in it. Since the tag prefix should only ever remain a prefix, I've simplified this to instead check for a digit. JGit's glob filtering uses the same digit detection as `Character#isDigit`. Now, tag prefixes prepend the default filter with `TAG_PREFIX[-v]*`. This makes the filterer search for the defined tag prefix while optionally accounting for any extra dashes or v's (for legacy branches that use `v1.0` or something). So, the contract is now that a tag must always include a digit for it to be included in versioning. - 0.0-pre-23 Baby-proof extra tag filters - 0.0-pre-22 Use SharedActions v0 - 0.0-pre-21 Clarify outdated README.md - 0.0-pre-20 Valid tags give a default offset of 0 Previously, tags that were created for a subproject needed to include a commit that modified a file within the path. This is no longer required and as long as the tag is created for the project's tag prefix, it will be counted as part of the project. For example, for project hash-utils with tag prefix 'hash', we have three commits: 1. An empty commit tagged 'hash-0.3' 2. A commit that modifies a file in the 'hash-utils' directory 3. A commit that does not modify any files in 'hash-utils' Commits 1 and 2 would be counted, but 3 would not. The resulting version number will be 0.3.1. This is currently using an implementation detail regarding how JGit's LogCommand returns its result. See eclipse-jgit/jgit#149 - 0.0-pre-19 Fix issue with commit count of 0 using fallback Fixes Git Version returning the incorrect commit offset if the last commit that modified the path is the same as the tagged commit - 0.0-pre-18 Account for tags with '-v' version prefix - 0.0-pre-17 Change remote URI strategy for project URL 1. Find a remote that contains a URI containing "MinecraftForge/" 2. Find a remote named "origin" 3. Find whatever remote might exist - 0.0-pre-16 Separate project URL from GitVersion.Info Allows getting the URL of the Git Version without needing to rely on other aspects of the Git Version succeeding. - 0.0-pre-15 Throw a proper exception on no tag This gives actually helpful info for debugging why a tag wasn't able to be described with the version's tag prefix and filters. - 0.0-pre-14 Fix SSH remotes not translating to project URL correctly - 0.0-pre-13 Update JGit to 7.2.0 It's still not on Maven Central, but at least the full release is out and I don't have to keep using the release candidate. - 0.0-pre-12 Allow tag prefix and filters to be set after creation Might delete this later, so don't count on it. This is for GradleUtils 2.x backwards compatibility in 2.4. - 0.0-pre-11 Properly account for filters starting with the `!` ignore character - 0.0-pre-10 Move some important utilities to GitVersion The same will probably be done with GitUtils#getRelativePath, moving those to file-utils when it is created. - 0.0-pre-9 Additional code cleanup - 0.0-pre-8 Fix access issues with GitVersion sealed permissions - 0.0-pre-7 Recover with an empty GitVersion in non-strict mode - 0.0-pre-6 Throw GitVersionException instead if not in a Git repository This allows this error to be recoverable from GradleUtils, since it is expected for GitVersionExceptions to be caught and potentially recoverable (i.e. using temporary fake versions such as 0.0.0), while IllegalArgumentExceptions should be dealt with accordingly. - 0.0-pre-5 The config is now the source of truth This essentially boils down to the design change that .gitversion is no longer written to by Git Version, but instead should be updated and edited by project maintainers. I might make some sort of generator in the future. Additionally: - Switched from JSON to TOML for config parsing - Locked down all API, leaving only the essentials for interacting with Git Version (net.minecraftforge.gitver.api) - Use interfaces for utility classes (mainly because I'm lazy and don't have to write as many keywords) - JGit is no longer exposed API in Git Version - Added strict mode, to allow fake version numbers to be used if necessary - `@Override` on the record parameters for IDE linting - Fixed commit counting not working for root projects - Fixed various CLI issues - Fixed some tag filtering implementation details - Now using absolute files for everything, because path resolutions - 0.0-pre-4 Add usage of GitVersion with git directory and path - 0.0-pre-3 Add some Groovy-friendly setters Ideally I need to rewrite this part of the API a little bit. For now to get the ball rolling, this is fine. - 0.0-pre-2 Update licenses - 0.0-pre-1 Initial commit As of right now, GitVersion is mostly a port of the Git utilities from GradleUtils and SharedActions. This is to ensure that the versioning system is consistent across all Forge projects. While not directly credited as co-authors, GitVersion was built off of the work done in GradleUtils and SharedActions by LexManos and prior Forge contributors.