Skip to content

Commit 4d6b279

Browse files
committed
plugin-development: Fix regex to properly handle Sponge builds targeting pre-release and RC minecraft versions
1 parent 11eb7af commit 4d6b279

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin-development/src/main/java/org/spongepowered/gradle/plugin/SpongeVersioningMetadataRule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
public class SpongeVersioningMetadataRule implements ComponentMetadataRule {
4343
// <mc version>-<API target>-<RC<BUILD> // development
4444
// <mc version>-<API target> // stable
45-
private static final Pattern SPONGE_IMPL_VERSION = Pattern.compile("(?<mc>[^-]+)-(?<api>[\\d.]+)(?:-RC(?<rc>\\d+))?");
45+
private static final Pattern SPONGE_IMPL_VERSION = Pattern.compile("(?<mc>[\\d+.]+-(?:pre|rc)[\\d]+|[^-]+)-(?<api>[\\d.]+)(?:-RC(?<rc>\\d+))?");
4646
private static final List<String> STATUS_SCHEME = Collections.unmodifiableList(Arrays.asList("rc", "release"));
4747

4848
public static final Attribute<String> MINECRAFT_TARGET = Attribute.of("org.spongepowered.minecraft-target", String.class);

0 commit comments

Comments
 (0)