Installing Gradle
Gradle The default local cache library is located under the. Gradle folder in the C-disk USER directory, you can add environment variables Gradle_user_home Custom cache locations after you install Gradle.
Installing the Eclipse Plugin
Eclipse App Market, search buildship, a plugin for the Eclipse official community, currently in version 1.0.
New Gradle Project
↓new Gradle Project, options, you can point to the local Gradle installation directory.
↓ Convert project to Web project type, project properties, project Facets
Gradle Configuration
↓ Open Build.gradle, such as the library that introduced SSH. Gradle defaults to the Jcenter warehouse, where maven repositories are used.
1Apply plugin:'Java'2 3 Repositories {4 mavencentral ()5 }6 7 Dependencies {8 //Struts Library9Compile group:'org.apache.struts', Name:'Struts2-core', Version:'2.3.24.1'TenCompile'org.apache.struts:struts2-spring-plugin:2.3.24.1' OneCompile'org.apache.struts:struts2-json-plugin:2.3.24.1' A - //Spring Library -Compile group:'org.springframework', Name:'Spring-core', Version:'4.2.3.RELEASE' theCompile group:'org.springframework', Name:'Spring-web', Version:'4.2.3.RELEASE' -Compile group:'org.springframework', Name:'Spring-orm', Version:'4.2.3.RELEASE' -Compile group:'org.springframework', Name:'SPRING-AOP', Version:'4.2.3.RELEASE' -Compile group:'org.springframework', Name:'spring-aspects', Version:'4.2.3.RELEASE' +Compile group:'org.springframework', Name:'Spring-jdbc', Version:'4.2.3.RELEASE' - + //Hibernate Library ACompile group:'org.hibernate', Name:'Hibernate-core', Version:'5.0.1.Final' at - //Common Library -Compile'org.slf4j:slf4j-api:1.7.13' -Compile'mysql:mysql-connector-java:5.1.38' -Compile'org.apache.commons:commons-pool2:2.4.2' -Compile'org.apache.commons:commons-dbcp2:2.1.1' in -Testcompile'junit:junit:4.12' to}
↓ configuration complete, refresh project, automatically download dependent libraries. Looking at the structure of project, all the dependencies are introduced.
Use of Gradle in eclipse