1212import org .gradle .api .reflect .TypeOf ;
1313import org .jetbrains .annotations .MustBeInvokedByOverriders ;
1414
15+ import java .io .Serial ;
1516import java .util .HashMap ;
1617import java .util .Map ;
1718
@@ -40,14 +41,14 @@ static Map<String, Action<? super MavenPomDeveloper>> makeDevelopers() {
4041 return makeDevelopers (Map .of (
4142 "LexManos" , makeDev ("LexManos" , "Lex Manos" ),
4243 "Paint_Ninja" , makeDev ("Paint_Ninja" ),
43- "SizableShrimp" , makeDev ("SizableShrimp" ),
44- "cpw" , makeDev ("cpw" ),
4544 "Jonathing" ,
makeDev (
"Jonathing" ,
"[email protected] " ,
"https://jonathing.me" ,
"America/New_York" )
4645 ));
4746 }
4847
4948 private static Map <String , Action <? super MavenPomDeveloper >> makeDevelopers (Map <String , Action <? super MavenPomDeveloper >> defaults ) {
5049 return new HashMap <>(defaults ) {
50+ private static final @ Serial long serialVersionUID = -9033218614762684158L ;
51+
5152 @ Override
5253 public Action <? super MavenPomDeveloper > get (Object key ) {
5354 this .ensure ((String ) key );
@@ -69,6 +70,7 @@ private static Action<? super MavenPomDeveloper> makeDev(String id, String name)
6970 return developer -> {
7071 developer .getId ().set (id );
7172 developer .getName ().set (name );
73+ developer .getRoles ().add ("developer" );
7274 };
7375 }
7476
@@ -83,6 +85,7 @@ private static Action<? super MavenPomDeveloper> makeDev(String id, String name,
8385 developer .getEmail ().set (email );
8486 developer .getUrl ().set (url );
8587 developer .getTimezone ().set (timezone );
88+ developer .getRoles ().add ("developer" );
8689 };
8790 }
8891
@@ -93,19 +96,19 @@ default void addRemoteDetails(MavenPom pom, String url) {
9396 throw new IllegalArgumentException ();
9497
9598 var strippedUrl = stripProtocol (url );
96- var fullURL = "https://" + url ;
99+ var fullURL = "https://" + strippedUrl ;
97100 pom .getUrl ().set (fullURL );
98101 pom .scm (scm -> {
99102 scm .getUrl ().set (fullURL );
100103 scm .getConnection ().set ("scm:git:git://%s.git" .formatted (strippedUrl ));
101- scm .getDeveloperConnection ().set ("scm:git:git@%s.git" .formatted (strippedUrl ));
104+ scm .getDeveloperConnection ().set ("scm:git:git@%s.git" .formatted (strippedUrl . replaceFirst ( "/" , ":" ) ));
102105 });
103106
104107 // the rest is GitHub-exclusive information
105108 if (!strippedUrl .contains ("github.com" )) return ;
106109
107110 pom .issueManagement (issues -> {
108- issues .getSystem ().set (url . split ( " \\ ." , 2 )[ 0 ] );
111+ issues .getSystem ().set ("github" );
109112 issues .getUrl ().set (fullURL + "/issues" );
110113 });
111114 pom .ciManagement (ci -> {
0 commit comments