forked from MovingBlocks/DestinationSol
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request MovingBlocks#634 from Cervator/groovyRefresh
feat: upgrade the groovyw system to be closer in sync with Terasology
- Loading branch information
Showing
8 changed files
with
508 additions
and
161 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
class lib { | ||
|
||
def excludedItems = [] | ||
|
||
def getGithubDefaultHome(Properties properties) { | ||
return properties.alternativeGithubHome ?: "MovingBlocks" | ||
} | ||
|
||
File targetDirectory = new File("libs") | ||
def itemType = "library" | ||
|
||
// Libs currently do not care about dependencies | ||
String[] findDependencies(File targetDir) { | ||
return [] | ||
} | ||
|
||
// TODO: Libs don't copy anything in yet .. they might be too unique. Some may Gradle stuff but not all (like the Index) | ||
def copyInTemplateFiles(File targetDir) { | ||
|
||
} | ||
|
||
/** | ||
* Filters the given items based on this item type's preferences | ||
* @param possibleItems A map of repos (possible items) and their descriptions (potential filter data) | ||
* @return A list containing only the items this type cares about | ||
*/ | ||
List filterItemsFromApi(Map possibleItems) { | ||
List itemList = [] | ||
|
||
// Libs only includes repos found to have a particular string snippet in their description | ||
// TODO: Consideration for libraries - generic vs project specific? TeraMath could be used in DestSol etc ... | ||
itemList = possibleItems.findAll { | ||
it.value?.contains("Automation category: Terasology Library") | ||
}.collect {it.key} | ||
|
||
return itemList | ||
} | ||
|
||
def refreshGradle(File targetDir) { | ||
println "Skipping refreshGradle for lib $targetDir- they vary too much to use any Gradle templates" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.