把spring源码clone下来之后,使用gradle编译不通过,异常日志如下:
FAILURE: Build failed with an exception. * Where: Build file 'E:codespring-framework-5.0.2.RELEASEuild.gradle' line: 15 * What went wrong: An exception occurred applying plugin request [id: 'com.gradle.build-scan', version: '1.8'] > Failed to apply plugin [id 'com.gradle.build-scan'] > This version of Gradle requires version 2.0.2 of the build scan plugin or later. Please see https://gradle.com/scans/help/gradle-incompatible-plugin-version for more information.
原因是gradle版本太高了,具体参考:https://docs.gradle.com/enterprise/compatibility/#build_scan_plugin
可以移步到这个网站下载:http://services.gradle.org/distributions/
Gradle Build Tool versions | Minimum plugin version | Maximum plugin version |
---|---|---|
>= 5.0 |
2.0.2 |
>= 2.1 |
4.1 - 4.10 |
1.8 |
1.16.x |
4.0 |
1.7.4 |
1.16.x |
2.0 - 3.5 |
1.0.x |
1.16.x |
< 2.0 |
not supported |
not supported |