Skip to content

Commit b29f68d

Browse files
authored
Merge pull request #275 from mhbkb/master
Extend package settings API to support `isCustomized` checking.
2 parents 540385b + fd55e89 commit b29f68d

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

pygradle-plugin/src/main/groovy/com/linkedin/gradle/python/util/DefaultPackageSettings.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ public boolean requiresSourceBuild(PackageInfo packageInfo) {
9696
return (version != null && version.contains("-"));
9797
}
9898

99+
@Override
100+
public boolean isCustomized(PackageInfo packageInfo) {
101+
// return false by default as no custom build options.
102+
return false;
103+
}
104+
99105
private boolean isProjectDirectory(PackageInfo packageInfo) {
100106
File packageDir = packageInfo.getPackageFile();
101107
String version = packageInfo.getVersion();

pygradle-plugin/src/main/groovy/com/linkedin/gradle/python/util/PackageSettings.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,19 @@ public interface PackageSettings<T> {
9494
* Determines if the package requires a build from source.
9595
* <p>
9696
* Even if the binary artifact of the package is available,
97-
* the package may need a rebuild because of custom build
98-
* options or environment.
97+
* the package may need a rebuild because of editable current
98+
* project or snapshots.
9999
*
100100
* @param t package information object
101101
* @return true when the package needs a rebuild from source
102102
*/
103103
boolean requiresSourceBuild(T t);
104+
105+
/**
106+
* Checks if the package is customized.
107+
*
108+
* @param t package information object
109+
* @return true when the package is customized
110+
*/
111+
boolean isCustomized(T t);
104112
}

0 commit comments

Comments
 (0)