I. Configuring Gradle using the Maven warehouse
During the project, we may encounter Maven's local libraries and Gradle used by the MAVEN local library, not the same library. Now summarize how the configuration makes both Maven and Gradle use the same Maven local libraries:
First of all, we need to understand two concepts: Maven local library [presentation is generally. m2], gradle local library [expression is generally. Gradle]
1.maven Configuring the Local library:
Mainly in the Settings.xml file, add the following content:
<localRepository>/xxxxx/repository</localRepository>
2. Gradle configuration using the MAVEN local library:
Modify the Build.gradle file to add the following:
repositories {
mavenLocal()
}
Note: This development is added in Build.gradle, and the MAVEN local library has been used by default.
3. Let Gradle you can read to MAVEN's local library configuration
The gradle uses the same policy as Maven to locate the local MAVEN cache location. If the address of the local MAVEN warehouse is defined in settings.xml, the address is used. The configuration in the Settings.xml file under user_home/.m2 overwrites the configuration in the settings.xml file that is stored under m2_home/conf. If there is no settings.xml configuration file, Gradle will use the default User_home/.m2/repository address.
4. Modify the Gradle local library [this is not related to the MAVEN local library, just this. Gradle folder is in too big, often need to move the external disk.]
Design Environment variables: gradle_user_home=/xxx/.gradle
Two. jdk1.8 Execute gradle command Prompt "Invalid source release: 1.8"
WORKAROUND: Project Right-"Run as-" Gradle build--arguments– "java home–" workspace JRE selection jdk1.8
Reprint Please specify: http://www.xujin.org
Summary of Gradle usage in the project