Move a few methods around for better logical order (no functional changes)
@@ -25,6 +25,19 @@ modulesRetrieved = []
// Module dependencies we don't want to retrieve as they live in the main Terasology repo
excludedDependencies = ["engine", "Core", "CoreSampleGameplay", "BuilderSampleGameplay"]
+/**
+ * Accepts input from the user, showing a descriptive prompt.
+ * @param prompt the prompt to show the user
+ */
+def getUserString(String prompt) {
+ println('\n*** ' + prompt + '\n')
+
+ def reader = new BufferedReader(new InputStreamReader(System.in))
+ // Note: Do not close reader, it will close System.in (Big no-no)
+
+ return reader.readLine()
+}
+
/**
* Primary entry point for retrieving modules, kicks off recursively if needed.
* @param modules the modules we want to retrieve
@@ -183,19 +196,6 @@ def updateModule(String name) {
moduleGit.pull remote: "origin"
}
-/**
- * Accepts input from the user, showing a descriptive prompt.
- * @param prompt the prompt to show the user
- */
-def getUserString(String prompt) {
- println('\n*** ' + prompt + '\n')
-
- def reader = new BufferedReader(new InputStreamReader(System.in))
- // Note: Do not close reader, it will close System.in (Big no-no)
-
- return reader.readLine()
-}
-
/**
* List all existing Git remotes for a given module.
* @param moduleName the module to list remotes for
@@ -215,6 +215,27 @@ def listRemotes(String moduleName) {
}
}
+/**
+ * Add new Git remotes for the given modules, all using the same remote name.
+ * @param modules the modules to add remotes for
+ * @param name the name to use for all the Git remotes
+ */
+def addRemotes(String[] modules, String name) {
+ for (String module : modules) {
+ addRemote(module, name)
+ }
+}
+
+/**
+ * Add a new Git remote for the given module, deducing a standard URL to the repo.
+ * @param moduleName the module to add the remote for
+ * @param remoteName the name to give the new remote
+ */
+def addRemote(String moduleName, String remoteName) {
+ addRemote(moduleName, remoteName, "https://github.com/$remoteName/$moduleName" + ".git")
+}
+
+
/**
* Add a new Git remote for the given module.
* @param moduleName the module to add the remote for
@@ -239,26 +260,6 @@ def addRemote(String moduleName, String remoteName, String URL) {
}
}
-/**
- * Add a new Git remote for the given module, deducing a standard URL to the repo.
- * @param moduleName the module to add the remote for
- * @param remoteName the name to give the new remote
- */
-def addRemote(String moduleName, String remoteName) {
- addRemote(moduleName, remoteName, "https://github.com/$remoteName/$moduleName" + ".git")
-}
-
-/**
- * Add new Git remotes for the given modules, all using the same remote name.
- * @param modules the modules to add remotes for
- * @param name the name to use for all the Git remotes
- */
-def addRemotes(String[] modules, String name) {
- for (String module : modules) {
- addRemote(module, name)
- }
-}
-
/**
* Simply prints usage information.
*/
