Skip to content

Commit 6f587d5

Browse files
fix: central Portal extension pom config
1 parent 4ae88c2 commit 6f587d5

1 file changed

Lines changed: 14 additions & 16 deletions

File tree

src/main/java/studio/o7/remora/RemoraPlugin.java

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,20 @@ public static void applyMavenPublishPluginConfiguration(@NonNull Logger logger,
7373
centralPortal.getPublishingType().set(PublishingType.USER_MANAGED);
7474
});
7575

76-
project.afterEvaluate(proj -> {
77-
var information = (DefaultInformationExtension) proj.getExtensions().getByType(InformationExtension.class);
78-
proj.getExtensions().configure(CentralPortalExtension.class, centralPortal -> {
79-
var rootName = project.getRootProject().getName();
80-
var projectName = proj.getName();
81-
if (rootName.equals(projectName))
82-
centralPortal.getName().set(rootName);
83-
else
84-
centralPortal.getName().set(rootName + "-" + projectName);
85-
centralPortal.pom(pom -> {
86-
if (information.getUrl().isPresent())
87-
pom.getUrl().set(information.getUrl());
88-
if (information.getDescription().isPresent())
89-
pom.getDescription().set(information.getDescription());
90-
information.configurePom(pom);
91-
});
76+
var information = (DefaultInformationExtension) project.getExtensions().getByType(InformationExtension.class);
77+
project.getExtensions().configure(CentralPortalExtension.class, centralPortal -> {
78+
var rootName = project.getRootProject().getName();
79+
var projectName = project.getName();
80+
if (rootName.equals(projectName))
81+
centralPortal.getName().set(rootName);
82+
else
83+
centralPortal.getName().set(rootName + "-" + projectName);
84+
centralPortal.pom(pom -> {
85+
if (information.getUrl().isPresent())
86+
pom.getUrl().set(information.getUrl());
87+
if (information.getDescription().isPresent())
88+
pom.getDescription().set(information.getDescription());
89+
information.configurePom(pom);
9290
});
9391
});
9492

0 commit comments

Comments
 (0)