MinecraftForge / ForgeGradle

Minecraft mod development framework used by Forge and FML for the gradle build system
GNU Lesser General Public License v2.1
508 stars 437 forks source link

Version range matching sometimes does not give expected result #909

Open PepperCode1 opened 1 year ago

PepperCode1 commented 1 year ago

This issue was observed towards the end of the 1.19.3 porting process of Create. Create uses JarJar to include Flywheel so it does not need to be installed separately.

The JarJar configuration for Flywheel can be found here. The version range is set as [0.6.8,0.6.9) and the Flywheel version used is 0.6.8.a-1.

Building the mod fails because JarJar reports that 0.6.8.a-1 does not match [0.6.8,0.6.9). This result is consistent and the exact build log can be found here.

Strangely, this issue did not happen on 1.18.2 or 1.19.2, even though the ForgeGradle version did not change, and thus the JarJar version did not change either. What makes me think that this issue is a bug is because org.apache.maven.artifact.versioning.VersionRange.createFromVersionSpec("[0.6.8,0.6.9)").containsVersion(new org.apache.maven.artifact.versioning.DefaultArtifactVersion("0.6.8.a-1")) returns true.