-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a46beb
commit 11f64e2
Showing
26 changed files
with
538 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/com/gradle/enterprise/conventions/PublishingConfigurationAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.gradle.enterprise.conventions; | ||
|
||
import com.gradle.develocity.agent.gradle.scan.BuildScanPublishingConfiguration; | ||
import org.gradle.api.Action; | ||
|
||
public abstract class PublishingConfigurationAction implements Action<BuildScanPublishingConfiguration> { | ||
|
||
public static final PublishingConfigurationAction PUBLISH_IF_AUTHENTICATED = new PublishingConfigurationAction("publishWhenAuthenticated") { | ||
@Override | ||
public void execute(BuildScanPublishingConfiguration publishing) { | ||
publishing.onlyIf(BuildScanPublishingConfiguration.PublishingContext::isAuthenticated); | ||
} | ||
}; | ||
|
||
public static final PublishingConfigurationAction PUBLISH_ON_FAILURE = new PublishingConfigurationAction("publishOnFailure") { | ||
@Override | ||
public void execute(BuildScanPublishingConfiguration publishing) { | ||
publishing.onlyIf(spec -> !spec.getBuildResult().getFailures().isEmpty()); | ||
} | ||
}; | ||
public static final PublishingConfigurationAction PUBLISH_ALWAYS = new PublishingConfigurationAction("publishOnFailure") { | ||
@Override | ||
public void execute(BuildScanPublishingConfiguration publishing) { | ||
publishing.onlyIf(__ -> true); | ||
} | ||
}; | ||
public final String name; | ||
|
||
public PublishingConfigurationAction(String name) { | ||
this.name = name; | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
.../com/gradle/enterprise/conventions/customvalueprovider/BuildCacheCustomValueProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...a/com/gradle/enterprise/conventions/customvalueprovider/BuildScanCustomValueProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.