Browse Source

Merge branch '6.0.x'

pull/31428/head
Stéphane Nicoll 1 year ago
parent
commit
1e7fc6035d
  1. 7
      buildSrc/src/main/java/org/springframework/build/api/ApiDiffPlugin.java
  2. 3
      settings.gradle

7
buildSrc/src/main/java/org/springframework/build/api/ApiDiffPlugin.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2019 the original author or authors. * Copyright 2002-2023 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -131,8 +131,9 @@ public class ApiDiffPlugin implements Plugin<Project> {
} }
private File getOutputFile(String baseLineVersion, Project project) { private File getOutputFile(String baseLineVersion, Project project) {
Path outDir = Paths.get(project.getRootProject().getBuildDir().getAbsolutePath(), String buildDirectoryPath = project.getRootProject()
"reports", "api-diff", .getLayout().getBuildDirectory().getAsFile().get().getAbsolutePath();
Path outDir = Paths.get(buildDirectoryPath, "reports", "api-diff",
baseLineVersion + "_to_" + project.getRootProject().getVersion()); baseLineVersion + "_to_" + project.getRootProject().getVersion());
return project.file(outDir.resolve(project.getName() + ".html").toString()); return project.file(outDir.resolve(project.getName() + ".html").toString());
} }

3
settings.gradle

@ -41,7 +41,8 @@ rootProject.children.each {project ->
settings.gradle.projectsLoaded { settings.gradle.projectsLoaded {
gradleEnterprise { gradleEnterprise {
buildScan { buildScan {
File buildDir = settings.gradle.rootProject.getBuildDir() File buildDir = settings.gradle.rootProject
.getLayout().getBuildDirectory().getAsFile().get()
buildDir.mkdirs() buildDir.mkdirs()
new File(buildDir, "build-scan-uri.txt").text = "(build scan not generated)" new File(buildDir, "build-scan-uri.txt").text = "(build scan not generated)"
buildScanPublished { scan -> buildScanPublished { scan ->

Loading…
Cancel
Save