搭建Gradle环境
构建成功
Starting Gradle Daemon...Gradle Daemon started in 1 s 688 ms> Task :buildSrc:compileJava UP-TO-DATE> Task :buildSrc:compileGroovy NO-SOURCE> Task :buildSrc:pluginDescriptors UP-TO-DATE> Task :buildSrc:processResources UP-TO-DATE> Task :buildSrc:classes UP-TO-DATE> Task :buildSrc:jar UP-TO-DATE> Task :buildSrc:generateSourceRoots UP-TO-DATE> Task :buildSrc:assemble UP-TO-DATE> Task :buildSrc:pluginUnderTestMetadata UP-TO-DATE> Task :buildSrc:compileTestJava NO-SOURCE> Task :buildSrc:compileTestGroovy NO-SOURCE> Task :buildSrc:processTestResources NO-SOURCE> Task :buildSrc:testClasses UP-TO-DATE> Task :buildSrc:test SKIPPED> Task :buildSrc:validateTaskProperties UP-TO-DATE> Task :buildSrc:check SKIPPED> Task :buildSrc:build UP-TO-DATE> Task :helpWelcome to Gradle 5.6.4.To run a build, run gradle <task> ...To see a list of available tasks, run gradle tasksTo see a list of command-line options, run gradle --helpTo see more detail about a task, run gradle help --task <task>For troubleshooting, visit https://help.gradle.orgBUILD SUCCESSFUL in 1m 14s1 actionable task: 1 executed> Task :helpWelcome to Gradle 5.6.4.To run a build, run gradle <task> ...To see a list of available tasks, run gradle tasksTo see a list of command-line options, run gradle --helpTo see more detail about a task, run gradle help --task <task>For troubleshooting, visit https://help.gradle.orgBUILD SUCCESSFUL in 9s1 actionable task: 1 executed
遇见的错误
Received status code 401 from server: Unauthorized
解决办法:
settings.gradle修改
将第四行pluginManagement->repositories节点下的maven配置改为阿里云的镜像
maven { url 'https://maven.aliyun.com/repository/public' }
POM relocation to an other version number is not fully supported in Gradle : xml-apis:xml-apis:2.0.2
解决办法:
build.gradle添加
configurations.all {resolutionStrategy {force 'xml-apis:xml-apis:1.4.01'}}
