forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reapply "[Build] Do not invalidate configuration cache when branch is…
… switched (elastic#118894)" (elastic#119300) (elastic#119325) * Reapply "[Build] Do not invalidate configuration cache when branch is switched (elastic#118894)" (elastic#119300) The original PR (elastic#118894) has broken serverless. * Fix gitinfo plugin for serverless usage * Update buildscan git revision reference
- Loading branch information
Showing
20 changed files
with
138 additions
and
78 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
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
22 changes: 22 additions & 0 deletions
22
.../src/main/java/org/elasticsearch/gradle/internal/conventions/info/GitInfoValueSource.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,22 @@ | ||
package org.elasticsearch.gradle.internal.conventions.info; | ||
|
||
import org.gradle.api.provider.Property; | ||
import org.gradle.api.provider.ValueSource; | ||
import org.gradle.api.provider.ValueSourceParameters; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.io.File; | ||
|
||
public abstract class GitInfoValueSource implements ValueSource<GitInfo, GitInfoValueSource.Parameters> { | ||
|
||
@Nullable | ||
@Override | ||
public GitInfo obtain() { | ||
File path = getParameters().getPath().get(); | ||
return GitInfo.gitInfo(path); | ||
} | ||
|
||
public interface Parameters extends ValueSourceParameters { | ||
Property<File> getPath(); | ||
} | ||
} |
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
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.