File tree Expand file tree Collapse file tree 3 files changed +10
-27
lines changed
buildSrc/src/main/java/org/springframework/boot/build Expand file tree Collapse file tree 3 files changed +10
-27
lines changed Original file line number Diff line number Diff line change 26
26
* Plugin to apply conventions to projects that are part of Spring Boot's build.
27
27
* Conventions are applied in response to various plugins being applied.
28
28
*
29
- * When the {@link JavaBasePlugin} is applied, the conventions in *
30
- * {@link JavaConventions} are applied.
29
+ * When the {@link JavaBasePlugin} is applied, the conventions in {@link JavaConventions}
30
+ * are applied.
31
31
*
32
32
* When the {@link MavenPublishPlugin} is applied, the conventions in
33
33
* {@link MavenPublishingConventions} are applied.
@@ -43,21 +43,9 @@ public class ConventionsPlugin implements Plugin<Project> {
43
43
44
44
@ Override
45
45
public void apply (Project project ) {
46
- applyJavaConventions (project );
47
- applyMavenPublishingConventions (project );
48
- applyAsciidoctorConventions (project );
49
- }
50
-
51
- private void applyJavaConventions (Project project ) {
52
46
new JavaConventions ().apply (project );
53
- }
54
-
55
- private void applyAsciidoctorConventions (Project project ) {
47
+ new MavenPublishingConventions ().apply (project );
56
48
new AsciidoctorConventions ().apply (project );
57
49
}
58
50
59
- private void applyMavenPublishingConventions (Project project ) {
60
- new MavenPublishingConventions ().applyPublishingConventions (project );
61
- }
62
-
63
51
}
Original file line number Diff line number Diff line change 48
48
import org .springframework .util .FileCopyUtils ;
49
49
50
50
/**
51
- * Applies Java Plugin conventions to projects that are part of Spring Boot's build.
52
- * Conventions are applied in response to various plugins being applied.
53
- * <p/>
54
- *
55
- * When the {@link JavaBasePlugin Java base plugin} is applied:
56
- *
57
- * <p/>
51
+ * Conventions that are applied in the presence of the {@link JavaBasePlugin}. When the
52
+ * plugin is applied:
58
53
*
59
54
* <ul>
60
55
* <li>{@code sourceCompatibility} is set to {@code 1.8}
Original file line number Diff line number Diff line change 31
31
import org .gradle .api .publish .maven .plugins .MavenPublishPlugin ;
32
32
33
33
/**
34
- * Applies Maven Publishing conventions to projects that are part of Spring Boot's build.
35
- * Conventions are applied in response to various plugins being applied.
36
- *
37
- * When the {@link MavenPublishPlugin Maven Publish plugin} is applied:
34
+ * Conventions that are applied in the presence of the {@link MavenPublishPlugin}. When
35
+ * the plugin is applied:
38
36
*
39
37
* <ul>
40
38
* <li>If the {@code deploymentRepository} property has been set, a
41
39
* {@link MavenArtifactRepository Maven artifact repository} is configured to publish to
42
40
* it.
43
41
* <li>The poms of all {@link MavenPublication Maven publications} are customized to meet
44
42
* Maven Central's requirements.
43
+ * <li>If the {@link JavaPlugin Java plugin} has also been applied, creation of Javadoc
44
+ * and source jars is enabled.
45
45
* </ul>
46
46
*
47
47
* <p/>
52
52
*/
53
53
class MavenPublishingConventions {
54
54
55
- void applyPublishingConventions (Project project ) {
55
+ void apply (Project project ) {
56
56
project .getPlugins ().withType (MavenPublishPlugin .class ).all ((mavenPublish ) -> {
57
57
PublishingExtension publishing = project .getExtensions ().getByType (PublishingExtension .class );
58
58
if (project .hasProperty ("deploymentRepository" )) {
You can’t perform that action at this time.
0 commit comments