File tree 2 files changed +19
-17
lines changed
gradle/plugins/conventions-plugin/src/main/java/org/springframework/ws/gradle/conventions
2 files changed +19
-17
lines changed Original file line number Diff line number Diff line change 30
30
class JavaBasePluginConventions {
31
31
32
32
void apply (Project project ) {
33
+ configureRepositories (project );
33
34
project .getTasks ().withType (Javadoc .class ).configureEach ((javadoc ) -> {
34
35
MinimalJavadocOptions options = javadoc .getOptions ();
35
36
options .quiet ();
@@ -40,4 +41,21 @@ void apply(Project project) {
40
41
});
41
42
}
42
43
44
+ private void configureRepositories (Project project ) {
45
+ project .getRepositories ().mavenCentral ();
46
+ String version = project .getVersion ().toString ();
47
+ if (version .contains ("-" )) {
48
+ project .getRepositories ().maven ((repository ) -> {
49
+ repository .setName ("Spring Milestones" );
50
+ repository .setUrl ("https://repo.spring.io/milestone" );
51
+ });
52
+ }
53
+ if (version .endsWith ("-SNAPSHOT" )) {
54
+ project .getRepositories ().maven ((repository ) -> {
55
+ repository .setName ("Spring Snapshots" );
56
+ repository .setUrl ("https://repo.spring.io/snapshot" );
57
+ });
58
+ }
59
+ }
60
+
43
61
}
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ class JavaPluginConventions {
43
43
void apply (Project project ) {
44
44
project .getPlugins ().apply (SpringJavaFormatPlugin .class );
45
45
JavaPluginExtension java = project .getExtensions ().getByType (JavaPluginExtension .class );
46
- configureRepositories (project );
47
46
enableSourceAndJavadocJars (java );
48
47
configureSourceAndTargetCompatibility (java );
49
48
configureDependencyManagement (project );
@@ -53,22 +52,7 @@ void apply(Project project) {
53
52
configureJUnitPlatform (project );
54
53
}
55
54
56
- private void configureRepositories (Project project ) {
57
- project .getRepositories ().mavenCentral ();
58
- String version = project .getVersion ().toString ();
59
- if (version .contains ("-" )) {
60
- project .getRepositories ().maven ((repository ) -> {
61
- repository .setName ("Spring Milestones" );
62
- repository .setUrl ("https://repo.spring.io/milestone" );
63
- });
64
- }
65
- if (version .endsWith ("-SNAPSHOT" )) {
66
- project .getRepositories ().maven ((repository ) -> {
67
- repository .setName ("Spring Snapshots" );
68
- repository .setUrl ("https://repo.spring.io/snapshot" );
69
- });
70
- }
71
- }
55
+
72
56
73
57
private void enableSourceAndJavadocJars (JavaPluginExtension java ) {
74
58
java .withSourcesJar ();
You can’t perform that action at this time.
0 commit comments