mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-29 20:17:36 +01:00
Move tools folder into test folder
- Classes still won't be present in JAR but classes will be automatically compiled by Maven inside of the test scope, facilitating the execution of tool tasks
This commit is contained in:
parent
23317caa46
commit
3645806edc
6
src/test/java/tools/README.md
Normal file
6
src/test/java/tools/README.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# About the _tools_ Folder
|
||||||
|
|
||||||
|
This _tools_ folder provides helpers and extended tests useful during the development of AuthMe.
|
||||||
|
This folder is not included during the build of AuthMe and does not contain unit tests.
|
||||||
|
|
||||||
|
Run the `ToolsRunner` class to perform a task.
|
@ -1,5 +1,7 @@
|
|||||||
import utils.ToolTask;
|
package tools;
|
||||||
import utils.ToolsConstants;
|
|
||||||
|
import tools.utils.ToolTask;
|
||||||
|
import tools.utils.ToolsConstants;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
@ -108,7 +110,7 @@ public final class ToolsRunner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String filePath = file.getPath();
|
String filePath = file.getPath();
|
||||||
String className = filePath
|
String className = "tools." + filePath
|
||||||
.substring(ToolsConstants.TOOLS_SOURCE_ROOT.length(), filePath.length() - 5)
|
.substring(ToolsConstants.TOOLS_SOURCE_ROOT.length(), filePath.length() - 5)
|
||||||
.replace(File.separator, ".");
|
.replace(File.separator, ".");
|
||||||
try {
|
try {
|
@ -1,15 +1,15 @@
|
|||||||
package commands;
|
package tools.commands;
|
||||||
|
|
||||||
import fr.xephi.authme.command.CommandArgumentDescription;
|
import fr.xephi.authme.command.CommandArgumentDescription;
|
||||||
import fr.xephi.authme.command.CommandDescription;
|
import fr.xephi.authme.command.CommandDescription;
|
||||||
import fr.xephi.authme.command.CommandPermissions;
|
import fr.xephi.authme.command.CommandPermissions;
|
||||||
import fr.xephi.authme.command.CommandUtils;
|
import fr.xephi.authme.command.CommandUtils;
|
||||||
import fr.xephi.authme.permission.PermissionNode;
|
import fr.xephi.authme.permission.PermissionNode;
|
||||||
import utils.FileUtils;
|
import tools.utils.FileUtils;
|
||||||
import utils.TagValue.NestedTagValue;
|
import tools.utils.TagValue.NestedTagValue;
|
||||||
import utils.TagValueHolder;
|
import tools.utils.TagValueHolder;
|
||||||
import utils.ToolTask;
|
import tools.utils.ToolTask;
|
||||||
import utils.ToolsConstants;
|
import tools.utils.ToolsConstants;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
@ -1,10 +1,10 @@
|
|||||||
package docs;
|
package tools.docs;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import commands.CommandPageCreater;
|
import tools.commands.CommandPageCreater;
|
||||||
import hashmethods.HashAlgorithmsDescriptionTask;
|
import tools.hashmethods.HashAlgorithmsDescriptionTask;
|
||||||
import permissions.PermissionsListWriter;
|
import tools.permissions.PermissionsListWriter;
|
||||||
import utils.ToolTask;
|
import tools.utils.ToolTask;
|
||||||
|
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
@ -1,4 +1,4 @@
|
|||||||
package hashmethods;
|
package tools.hashmethods;
|
||||||
|
|
||||||
import fr.xephi.authme.security.HashAlgorithm;
|
import fr.xephi.authme.security.HashAlgorithm;
|
||||||
import fr.xephi.authme.security.crypts.EncryptionMethod;
|
import fr.xephi.authme.security.crypts.EncryptionMethod;
|
@ -1,11 +1,11 @@
|
|||||||
package hashmethods;
|
package tools.hashmethods;
|
||||||
|
|
||||||
import fr.xephi.authme.security.HashAlgorithm;
|
import fr.xephi.authme.security.HashAlgorithm;
|
||||||
import utils.FileUtils;
|
import tools.utils.FileUtils;
|
||||||
import utils.TagValue.NestedTagValue;
|
import tools.utils.TagValue.NestedTagValue;
|
||||||
import utils.TagValueHolder;
|
import tools.utils.TagValueHolder;
|
||||||
import utils.ToolTask;
|
import tools.utils.ToolTask;
|
||||||
import utils.ToolsConstants;
|
import tools.utils.ToolsConstants;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
@ -1,4 +1,4 @@
|
|||||||
package hashmethods;
|
package tools.hashmethods;
|
||||||
|
|
||||||
import fr.xephi.authme.security.crypts.EncryptionMethod;
|
import fr.xephi.authme.security.crypts.EncryptionMethod;
|
||||||
import fr.xephi.authme.security.crypts.description.SaltType;
|
import fr.xephi.authme.security.crypts.description.SaltType;
|
@ -1,4 +1,4 @@
|
|||||||
package messages;
|
package tools.messages;
|
||||||
|
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
import com.google.common.collect.HashMultimap;
|
import com.google.common.collect.HashMultimap;
|
||||||
@ -8,7 +8,7 @@ import fr.xephi.authme.output.MessageKey;
|
|||||||
import fr.xephi.authme.util.StringUtils;
|
import fr.xephi.authme.util.StringUtils;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import utils.FileUtils;
|
import tools.utils.FileUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
@ -1,11 +1,11 @@
|
|||||||
package messages;
|
package tools.messages;
|
||||||
|
|
||||||
import com.google.common.collect.Multimap;
|
import com.google.common.collect.Multimap;
|
||||||
import fr.xephi.authme.util.StringUtils;
|
import fr.xephi.authme.util.StringUtils;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import utils.ToolTask;
|
import tools.utils.ToolTask;
|
||||||
import utils.ToolsConstants;
|
import tools.utils.ToolsConstants;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
@ -1,4 +1,4 @@
|
|||||||
package messages.translation;
|
package tools.messages.translation;
|
||||||
|
|
||||||
import org.bukkit.configuration.InvalidConfigurationException;
|
import org.bukkit.configuration.InvalidConfigurationException;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
@ -1,4 +1,4 @@
|
|||||||
package messages.translation;
|
package tools.messages.translation;
|
||||||
|
|
||||||
import com.google.common.io.CharStreams;
|
import com.google.common.io.CharStreams;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@ -6,8 +6,8 @@ import fr.xephi.authme.output.MessageKey;
|
|||||||
import fr.xephi.authme.util.StringUtils;
|
import fr.xephi.authme.util.StringUtils;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import utils.ToolTask;
|
import tools.utils.ToolTask;
|
||||||
import utils.ToolsConstants;
|
import tools.utils.ToolsConstants;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
@ -1,15 +1,15 @@
|
|||||||
package messages.translation;
|
package tools.messages.translation;
|
||||||
|
|
||||||
import com.google.common.io.Resources;
|
import com.google.common.io.Resources;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import fr.xephi.authme.output.MessageKey;
|
import fr.xephi.authme.output.MessageKey;
|
||||||
import messages.MessageFileVerifier;
|
|
||||||
import messages.VerifyMessagesTask;
|
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import utils.FileUtils;
|
import tools.messages.MessageFileVerifier;
|
||||||
import utils.ToolTask;
|
import tools.messages.VerifyMessagesTask;
|
||||||
import utils.ToolsConstants;
|
import tools.utils.FileUtils;
|
||||||
|
import tools.utils.ToolTask;
|
||||||
|
import tools.utils.ToolsConstants;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
@ -1,4 +1,4 @@
|
|||||||
package messages.translation;
|
package tools.messages.translation;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,4 +1,4 @@
|
|||||||
package messages.translation;
|
package tools.messages.translation;
|
||||||
|
|
||||||
import fr.xephi.authme.util.StringUtils;
|
import fr.xephi.authme.util.StringUtils;
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
package messages.translation;
|
package tools.messages.translation;
|
||||||
|
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import utils.FileUtils;
|
import tools.utils.FileUtils;
|
||||||
import utils.ToolsConstants;
|
import tools.utils.ToolsConstants;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
@ -1,11 +1,11 @@
|
|||||||
package permissions;
|
package tools.permissions;
|
||||||
|
|
||||||
import fr.xephi.authme.permission.AdminPermission;
|
import fr.xephi.authme.permission.AdminPermission;
|
||||||
import fr.xephi.authme.permission.PermissionNode;
|
import fr.xephi.authme.permission.PermissionNode;
|
||||||
import fr.xephi.authme.permission.PlayerPermission;
|
import fr.xephi.authme.permission.PlayerPermission;
|
||||||
import fr.xephi.authme.permission.PlayerStatePermission;
|
import fr.xephi.authme.permission.PlayerStatePermission;
|
||||||
import utils.FileUtils;
|
import tools.utils.FileUtils;
|
||||||
import utils.ToolsConstants;
|
import tools.utils.ToolsConstants;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
@ -1,10 +1,10 @@
|
|||||||
package permissions;
|
package tools.permissions;
|
||||||
|
|
||||||
import utils.FileUtils;
|
import tools.utils.FileUtils;
|
||||||
import utils.TagValue.NestedTagValue;
|
import tools.utils.TagValue.NestedTagValue;
|
||||||
import utils.TagValueHolder;
|
import tools.utils.TagValueHolder;
|
||||||
import utils.ToolTask;
|
import tools.utils.ToolTask;
|
||||||
import utils.ToolsConstants;
|
import tools.utils.ToolsConstants;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
@ -1,4 +1,4 @@
|
|||||||
package utils;
|
package tools.utils;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
@ -1,7 +1,7 @@
|
|||||||
package utils;
|
package tools.utils;
|
||||||
|
|
||||||
import utils.TagValue.NestedTagValue;
|
import tools.utils.TagValue.NestedTagValue;
|
||||||
import utils.TagValue.TextTagValue;
|
import tools.utils.TagValue.TextTagValue;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
@ -1,4 +1,4 @@
|
|||||||
package utils;
|
package tools.utils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,6 +1,6 @@
|
|||||||
package utils;
|
package tools.utils;
|
||||||
|
|
||||||
import utils.TagValue.TextTagValue;
|
import tools.utils.TagValue.TextTagValue;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
@ -1,4 +1,4 @@
|
|||||||
package utils;
|
package tools.utils;
|
||||||
|
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package utils;
|
package tools.utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for the src/tools folder.
|
* Constants for the src/tools folder.
|
||||||
@ -12,7 +12,7 @@ public final class ToolsConstants {
|
|||||||
|
|
||||||
public static final String MAIN_RESOURCES_ROOT = "src/main/resources/";
|
public static final String MAIN_RESOURCES_ROOT = "src/main/resources/";
|
||||||
|
|
||||||
public static final String TOOLS_SOURCE_ROOT = "src/tools/";
|
public static final String TOOLS_SOURCE_ROOT = "src/test/java/tools/";
|
||||||
|
|
||||||
public static final String DOCS_FOLDER = "docs/";
|
public static final String DOCS_FOLDER = "docs/";
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
# About src/tools
|
|
||||||
This _tools_ folder provides helpers and extended tests useful during the development of AuthMe.
|
|
||||||
This folder is not included during the build of AuthMe.
|
|
Loading…
Reference in New Issue
Block a user