1 Libgdx gradle setup 2 =================== 3 4 Modular setup powered by gradle, allowing any combination of sub projects and official extensions to get you up and running in a few clicks. Although this tool will handle setup for you, LEARN GRADLE! 5 6 ![Setup Ui](http://i.imgur.com/7fUXXM3.png) 7 8 Example of use: 9 10 ```java 11 DependencyBank bank = new DependencyBank(); 12 13 ProjectBuilder builder = new ProjectBuilder(); 14 List<ProjectType> modules = new ArrayList<ProjectType>(); 15 modules.add(ProjectType.CORE); 16 modules.add(ProjectType.DESKTOP); 17 modules.add(ProjectType.ANDROID); 18 modules.add(ProjectType.IOS); 19 // Gwt has no friends 20 //modules.add(ProjectType.GWT); 21 22 List<Dependency> dependencies = new ArrayList<Dependency>(); 23 dependencies.add(bank.getDependency(ProjectDependency.GDX)); 24 dependencies.add(bank.getDependency(ProjectDependency.BULLET)); 25 dependencies.add(bank.getDependency(ProjectDependency.FREETYPE)); 26 27 List<String> incompatList = builder.buildProject(modules, dependencies); 28 //incompatList is a list of strings if there are incompatibilities found. 29 // The setup ui checks for these and pops up a dialog. 30 ``` 31 32 33 The builder will generate the settings.gradle, build.gradle file, as well as alter all the platform specific files that reference dependencies/assets. 34 35 Files Altered: 36 * settings.gradle 37 * build.gradle 38 * GdxDefinition.gwt.xml 39 * GdxDefinitionSuperDev.gwt.xml 40 * robovm.xml 41 * desktop/build.gradle (for eclipse task) 42 43 Modular setup classes 44 ===================== 45 46 * BuildScriptHelper - Helper class for writing the build.gradle script to file. 47 * Dependency - Holds all the information for a dependency for all platforms 48 * ProjectBuilder - The project builder, manages the writers and temporary files 49 * DependencyBank - The bank for all supported sub modules, and dependencies. Project repositories and plugin versions are defined here. 50 51 Assets 52 ====== 53 54 android/assets is the assets directory, however if there is no android project selected, it will configure the project to use core/assets 55 56