Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to add version specific properties #27

Open
wants to merge 1 commit into
base: mc1.12.2
Choose a base branch
from

Conversation

ALongStringOfNumbers
Copy link
Contributor

Adds the ability to defined version specific properties.

Properties can now be defined as 1.7.10 or 1.12.2 only, with the default of "" allowing all versions.

Properties that do not match with the version will not be parsed, and will not be added into properties.gradle on automatic update.

@@ -811,6 +965,12 @@ public void initFromProperties(Map<?, ?> props, BiConsumer<String, Object> onMis
if (prop == null) {
continue;
}
final String mcVersion = prop.mcVersion();
if (!mcVersion.isEmpty()) {
if (!GTNHGradlePlugin.MinecraftVersion.isAcceptableMinecraftVersion(mcVersion)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is loaded in an isolated classloader during the update process, so it shouldn't use the GTNHGradlePlugin class at all or it will crash the script updater. Moving MinecraftVersion to not be an inner class and making sure it doesn't have any gradle or other library dependencies would be required to use it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants