-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow configuring build cache through the DevelocityConfigurable
- Loading branch information
1 parent
29ea9cb
commit f8468ff
Showing
11 changed files
with
95 additions
and
16 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
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
19 changes: 19 additions & 0 deletions
19
...locity-gradle-plugin/src/main/java/com/myorg/configurable/NoopBuildCacheConfigurable.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,19 @@ | ||
package com.myorg.configurable; | ||
|
||
/* | ||
* Build cache cannot be configured via a plugin prior to Gradle 6.0, so build | ||
* cache operations must be a no-op. | ||
*/ | ||
final class NoopBuildCacheConfigurable implements BuildCacheConfigurable { | ||
|
||
@Override | ||
public LocalBuildCacheConfigurable getLocal() { | ||
return new NoopLocalBuildCacheConfigurable(); | ||
} | ||
|
||
@Override | ||
public RemoteBuildCacheConfigurable getRemote() { | ||
return new NoopRemoteBuildCacheConfigurable(); | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
...y-gradle-plugin/src/main/java/com/myorg/configurable/NoopLocalBuildCacheConfigurable.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,26 @@ | ||
package com.myorg.configurable; | ||
|
||
import java.io.File; | ||
|
||
/* | ||
* Build cache cannot be configured via a plugin prior to Gradle 6.0, so build | ||
* cache operations must be a no-op. | ||
*/ | ||
final class NoopLocalBuildCacheConfigurable implements LocalBuildCacheConfigurable { | ||
|
||
@Override | ||
public void setEnabled(boolean enabled) { | ||
|
||
} | ||
|
||
@Override | ||
public void setStoreEnabled(boolean storeEnabled) { | ||
|
||
} | ||
|
||
@Override | ||
public void setDirectory(File directory) { | ||
|
||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
...-gradle-plugin/src/main/java/com/myorg/configurable/NoopRemoteBuildCacheConfigurable.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,19 @@ | ||
package com.myorg.configurable; | ||
|
||
/* | ||
* Build cache cannot be configured via a plugin prior to Gradle 6.0, so build | ||
* cache operations must be a no-op. | ||
*/ | ||
final class NoopRemoteBuildCacheConfigurable implements RemoteBuildCacheConfigurable { | ||
|
||
@Override | ||
public void setEnabled(boolean enabled) { | ||
|
||
} | ||
|
||
@Override | ||
public void setStoreEnabled(boolean storeEnabled) { | ||
|
||
} | ||
|
||
} |
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