Commit e41a53cf authored by Nelson Osacky's avatar Nelson Osacky Committed by Andy Wilkinson

Add Gradle Enterprise Extension

This adds build caching and build scans.

The changes required disabling scans when using the maven invoker
plugin in order to not cause duplicate build scans when invoking other
maven builds. There is also an empty `.mvn` folder in the
spring-boot-starters project to prevent duplicate build scans as well
since there is no way to pass properties to the maven-javadoc-plugin.

The checkstyle plugin was causing a cache miss with the
`propertyExpansion` because it contains an absolute path. The absolute
path is now ignored and instead the files are added as inputs to the
checkstyle plugin. This only enables the local build cache. The remote
cache is not yet enabled.

On my local machine:

./mvnw clean install build times go from about 30 minutes to about 10 minutes.
./mvnw clean install -Pfull build times go from about 60 minutes to about 13 minutes.

See gh-22089
parent f68671e1
...@@ -38,3 +38,4 @@ transaction-logs ...@@ -38,3 +38,4 @@ transaction-logs
secrets.yml secrets.yml
.gradletasknamecache .gradletasknamecache
.sts4-cache .sts4-cache
.mvn/.gradle-enterprise/gradle-enterprise-workspace-id
\ No newline at end of file
<extensions>
<extension>
<groupId>com.gradle</groupId>
<artifactId>gradle-enterprise-maven-extension</artifactId>
<version>1.5.3</version>
</extension>
<extension>
<groupId>io.spring.ge.conventions</groupId>
<artifactId>gradle-enterprise-conventions-maven-extension</artifactId>
<version>0.0.5</version>
</extension>
</extensions>
\ No newline at end of file
<gradleEnterprise
xmlns="https://www.gradle.com/gradle-enterprise-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.gradle.com/gradle-enterprise-maven https://www.gradle.com/schema/gradle-enterprise-maven.xsd">
<server>
<url>https://ge.spring.io</url>
</server>
<buildScan>
<publishIfAuthenticated>true</publishIfAuthenticated>
</buildScan>
<buildCache>
<local><enabled>true</enabled></local>
</buildCache>
</gradleEnterprise>
\ No newline at end of file
...@@ -250,5 +250,38 @@ ...@@ -250,5 +250,38 @@
</plugin> </plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins>
<plugin>
<groupId>com.gradle</groupId>
<artifactId>gradle-enterprise-maven-extension</artifactId>
<!-- There is a build warning because we don't specify the version here. We do this instead of specifying the verison number twice -->
<configuration>
<gradleEnterprise>
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<inputs>
<fileSets>
<fileSet>
<name>allowlist</name>
<paths>
<path>${main.basedir}/src/checkstyle</path>
</paths>
<normalization>RELATIVE_PATH</normalization>
</fileSet>
</fileSets>
<properties>
<property>
<name>propertyExpansion</name>
<value>ignoredValue</value>
</property>
</properties>
</inputs>
</plugin>
</plugins>
</gradleEnterprise>
</configuration>
</plugin>
</plugins>
</build> </build>
</project> </project>
This file is empty so that the starters project does not generate multiple build scans.
\ No newline at end of file
...@@ -88,6 +88,9 @@ ...@@ -88,6 +88,9 @@
<addTestClassPath>true</addTestClassPath> <addTestClassPath>true</addTestClassPath>
<skipInvocation>${skipTests}</skipInvocation> <skipInvocation>${skipTests}</skipInvocation>
<streamLogs>true</streamLogs> <streamLogs>true</streamLogs>
<properties>
<scan>false</scan>
</properties>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
......
...@@ -153,6 +153,9 @@ ...@@ -153,6 +153,9 @@
<addTestClassPath>true</addTestClassPath> <addTestClassPath>true</addTestClassPath>
<skipInvocation>${skipTests}</skipInvocation> <skipInvocation>${skipTests}</skipInvocation>
<streamLogs>true</streamLogs> <streamLogs>true</streamLogs>
<properties>
<scan>false</scan>
</properties>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
<pomIncludes> <pomIncludes>
<pomInclude>pom.xml</pomInclude> <pomInclude>pom.xml</pomInclude>
</pomIncludes> </pomIncludes>
<properties>
<scan>false</scan>
</properties>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment