@@ -109,15 +109,15 @@ public abstract class GitCommitIdPluginGitSettingsExtension {
109109 *
110110 * <p>Defaults to {@code true}, so a missing {@code .git} directory may cause a build failure.
111111 */
112- public abstract Property <Boolean > getFailOnNoGitDirectory ();
112+ public abstract Property <Boolean > getShouldFailOnNoGitDirectory ();
113113
114114 /**
115115 * Control whether the plugin should fail the build if it's unable to
116116 * obtain enough data for a complete run (e.g. gather all requested information).
117117 *
118118 * <p>Defaults to {@code true}, so missing data may cause a build failure.
119119 */
120- public abstract Property <Boolean > getFailOnUnableToExtractRepoInfo ();
120+ public abstract Property <Boolean > getShouldFailOnUnableToExtractRepoInfo ();
121121
122122 /**
123123 * This plugin ships with custom {@code jgit} implementation that is being used to obtain all
@@ -133,7 +133,7 @@ public abstract class GitCommitIdPluginGitSettingsExtension {
133133 * <p>To not get your build stuck forever, this plugin also has an option to configure a
134134 * maximum timeout to wait for any native command. Refer to {@link #getNativeGitTimeoutInMs()}.
135135 */
136- public abstract Property <Boolean > getUseNativeGit ();
136+ public abstract Property <Boolean > getShouldUseNativeGit ();
137137
138138
139139 /**
@@ -159,7 +159,7 @@ public abstract class GitCommitIdPluginGitSettingsExtension {
159159 * about the repository with the native Git executable does not terminate.
160160 *
161161 * <p>Note: This option will only be taken into consideration when using the native git
162- * executable ({@link #getUseNativeGit ()} is set to {@code true}).
162+ * executable ({@link #getShouldUseNativeGit ()} is set to {@code true}).
163163 *
164164 * <p>By default this timeout is set to 30000 (30 seconds).
165165 */
@@ -180,8 +180,13 @@ public abstract class GitCommitIdPluginGitSettingsExtension {
180180 * Certainly a {@code git fetch} is an operation that may alter your local git repository
181181 * and thus the plugin will operate not perform such operation (offline is set to {@code true}).
182182 * If you however desire more accurate properties you may want to set this to {@code false}.
183+ *
184+ * <p>When enabled the "up-to-date" checking might not work correctly anymore.
185+ * A git fetch might update the state of the dotGitDir and since this
186+ * is used as input might cause gradle to think that something
187+ * in git has changed that warrants a new execution of the plugin.
183188 */
184- public abstract Property <Boolean > getOffline ();
189+ public abstract Property <Boolean > getShouldStayOffline ();
185190
186191 @ Inject
187192 public ProjectLayout getProjectLayout () {
@@ -197,11 +202,11 @@ public GitCommitIdPluginGitSettingsExtension() {
197202 getProjectLayout ().getProjectDirectory ().dir (".git" ));
198203 getGitDescribeConfig ().convention (new GitDescribeConfig ());
199204 getAbbrevLength ().convention (7 );
200- getFailOnNoGitDirectory ().convention (true );
201- getFailOnUnableToExtractRepoInfo ().convention (true );
202- getUseNativeGit ().convention (false );
205+ getShouldFailOnNoGitDirectory ().convention (true );
206+ getShouldFailOnUnableToExtractRepoInfo ().convention (true );
207+ getShouldUseNativeGit ().convention (false );
203208 getEvaluateOnCommit ().convention ("HEAD" );
204209 getNativeGitTimeoutInMs ().convention (30000L );
205- getOffline ().convention (true );
210+ getShouldStayOffline ().convention (true );
206211 }
207212}
0 commit comments