Loading sources/src/resources/init-scripts/gradle-actions.build-result-capture-service.plugin.groovy +3 −5 Changes for sources/src/resources/init-scripts/gradle-actions.build-result-capture-service.plugin.groovy: 3 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -2,12 +2,10 @@ import org.gradle.tooling.events.* import org.gradle.tooling.events.task.* import org.gradle.util.GradleVersion // Can't use settingsEvaluated since this script is applied inside a settingsEvaluated handler // But projectsEvaluated is good enough, since the build service won't catch configuration failures anyway projectsEvaluated { settingsEvaluated { settings -> def projectTracker = gradle.sharedServices.registerIfAbsent("gradle-action-buildResultsRecorder", BuildResultsRecorder, { spec -> spec.getParameters().getRootProjectName().set(gradle.rootProject.name) spec.getParameters().getRootProjectDir().set(gradle.rootProject.rootDir.absolutePath) spec.getParameters().getRootProjectName().set(settings.rootProject.name) spec.getParameters().getRootProjectDir().set(settings.rootDir.absolutePath) spec.getParameters().getRequestedTasks().set(gradle.startParameter.taskNames.join(" ")) spec.getParameters().getGradleHomeDir().set(gradle.gradleHomeDir.absolutePath) spec.getParameters().getInvocationId().set(gradle.ext.invocationId) Loading sources/src/resources/init-scripts/gradle-actions.build-result-capture.init.gradle +5 −5 Changes for sources/src/resources/init-scripts/gradle-actions.build-result-capture.init.gradle: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -21,16 +21,16 @@ if (isTopLevelBuild) { def invocationId = "-${System.currentTimeMillis()}" if (atLeastGradle6) { def useBuildService = version >= GradleVersion.version("6.6") settingsEvaluated { settings -> // By default, use standard mechanisms to capture build results def useBuildService = version >= GradleVersion.version("6.6") if (useBuildService) { captureUsingBuildService(settings, invocationId) captureUsingBuildService(invocationId) } else { captureUsingBuildFinished(gradle, invocationId) } // Use the Develocity plugin to also capture build scan links, when available settingsEvaluated { settings -> settings.pluginManager.withPlugin(GE_PLUGIN_ID) { // Only execute if develocity plugin isn't applied. if (!settings.extensions.findByName(DEVELOCITY_EXTENSION)) { Loading Loading @@ -100,7 +100,7 @@ def captureUsingBuildFinished(gradle, invocationId) { } } def captureUsingBuildService(settings, invocationId) { def captureUsingBuildService(invocationId) { gradle.ext.invocationId = invocationId apply from: 'gradle-actions.build-result-capture-service.plugin.groovy' } Loading Loading
sources/src/resources/init-scripts/gradle-actions.build-result-capture-service.plugin.groovy +3 −5 Changes for sources/src/resources/init-scripts/gradle-actions.build-result-capture-service.plugin.groovy: 3 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -2,12 +2,10 @@ import org.gradle.tooling.events.* import org.gradle.tooling.events.task.* import org.gradle.util.GradleVersion // Can't use settingsEvaluated since this script is applied inside a settingsEvaluated handler // But projectsEvaluated is good enough, since the build service won't catch configuration failures anyway projectsEvaluated { settingsEvaluated { settings -> def projectTracker = gradle.sharedServices.registerIfAbsent("gradle-action-buildResultsRecorder", BuildResultsRecorder, { spec -> spec.getParameters().getRootProjectName().set(gradle.rootProject.name) spec.getParameters().getRootProjectDir().set(gradle.rootProject.rootDir.absolutePath) spec.getParameters().getRootProjectName().set(settings.rootProject.name) spec.getParameters().getRootProjectDir().set(settings.rootDir.absolutePath) spec.getParameters().getRequestedTasks().set(gradle.startParameter.taskNames.join(" ")) spec.getParameters().getGradleHomeDir().set(gradle.gradleHomeDir.absolutePath) spec.getParameters().getInvocationId().set(gradle.ext.invocationId) Loading
sources/src/resources/init-scripts/gradle-actions.build-result-capture.init.gradle +5 −5 Changes for sources/src/resources/init-scripts/gradle-actions.build-result-capture.init.gradle: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -21,16 +21,16 @@ if (isTopLevelBuild) { def invocationId = "-${System.currentTimeMillis()}" if (atLeastGradle6) { def useBuildService = version >= GradleVersion.version("6.6") settingsEvaluated { settings -> // By default, use standard mechanisms to capture build results def useBuildService = version >= GradleVersion.version("6.6") if (useBuildService) { captureUsingBuildService(settings, invocationId) captureUsingBuildService(invocationId) } else { captureUsingBuildFinished(gradle, invocationId) } // Use the Develocity plugin to also capture build scan links, when available settingsEvaluated { settings -> settings.pluginManager.withPlugin(GE_PLUGIN_ID) { // Only execute if develocity plugin isn't applied. if (!settings.extensions.findByName(DEVELOCITY_EXTENSION)) { Loading Loading @@ -100,7 +100,7 @@ def captureUsingBuildFinished(gradle, invocationId) { } } def captureUsingBuildService(settings, invocationId) { def captureUsingBuildService(invocationId) { gradle.ext.invocationId = invocationId apply from: 'gradle-actions.build-result-capture-service.plugin.groovy' } Loading