76
76
public abstract class SpongeConventionPlugin implements Plugin <Project > {
77
77
private static final Logger LOGGER = Logging .getLogger (SpongeConventionPlugin .class );
78
78
79
- private static final String DISABLE_CADIX_LICENSER = "sponge.disableLicenser " ;
79
+ private static final String DISABLE_SPOTLESS_LICENSER = "sponge.disableSpotlessLicenser " ;
80
80
81
81
private @ UnknownNullability Project project ;
82
82
@@ -102,7 +102,7 @@ public void apply(final Project target) {
102
102
103
103
this .configurePublicationMetadata (indra );
104
104
this .configureStandardTasks ();
105
- if (! "true" . equals (this .project . findProperty ( SpongeConventionPlugin . DISABLE_CADIX_LICENSER ) )) {
105
+ if (SpongeConventionPlugin . shouldApplyLicenser (this .project )) {
106
106
this .configureLicenseHeaders (target .getExtensions ().getByType (IndraSpotlessLicenserExtension .class ));
107
107
}
108
108
this .configureJarSigning ();
@@ -147,7 +147,7 @@ private void configureStandardTasks() {
147
147
148
148
private void applyPlugins (final PluginContainer plugins ) {
149
149
plugins .apply (IndraPlugin .class );
150
- if (! "true" . equals (this .project . findProperty ( SpongeConventionPlugin . DISABLE_CADIX_LICENSER ) )) {
150
+ if (SpongeConventionPlugin . shouldApplyLicenser (this .project )) {
151
151
plugins .apply (IndraSpotlessLicenserPlugin .class );
152
152
}
153
153
plugins .apply (GitPlugin .class );
@@ -270,4 +270,8 @@ private void configureJarSigning() {
270
270
}
271
271
});
272
272
}
273
+
274
+ private static boolean shouldApplyLicenser (final Project project ) {
275
+ return !"true" .equals (project .findProperty (SpongeConventionPlugin .DISABLE_SPOTLESS_LICENSER ));
276
+ }
273
277
}
0 commit comments