Skip to content

Commit

Permalink
Correct NiA project name so that configuration is properly applied
Browse files Browse the repository at this point in the history
  • Loading branch information
tresat committed May 22, 2024
1 parent 7cfdf83 commit 5cf96fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,12 @@ private void linkDslModelToPlugin(Project project, AndroidApplication dslModel)
return null;
});

if (Objects.equals(project.getRootProject().getName(), "nowinandroid")) {
// TODO: All this configuration should be moved to the NiA project
if (Objects.equals(project.getRootProject().getName(), NiaSupport.NIA_PROJECT_NAME)) {
// ProductFlavors are automatically added by the LIBRARY plugin via NiA support only, ATM, so we
// need to make sure any Android APPLICATION projects have the necessary attributes for project deps to work.
configureContentTypeAttributes(project);
}

// TODO: All this configuration should be moved to the NiA project
if (Objects.equals(project.getRootProject().getName(), "nowinandroid")) {
NiaSupport.configureNiaApplication(project, dslModel);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private void linkDslModelToPlugin(Project project, AndroidLibrary dslModel) {
super.linkDslModelToPlugin(project, dslModel, android);

// TODO: All this configuration should be moved to the NiA project
if (Objects.equals(project.getRootProject().getName(), "nowinandroid")) {
if (Objects.equals(project.getRootProject().getName(), NiaSupport.NIA_PROJECT_NAME)) {
NiaSupport.configureNiaLibrary(project, dslModel);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
* This class is not meant to be used by other projects.
*/
public final class NiaSupport {
public static final String NIA_PROJECT_NAME = "now-in-android";

private NiaSupport() { /* Not instantiable */ }

public static void configureNiaLibrary(Project project, AndroidSoftware dslModel) {
Expand Down

0 comments on commit 5cf96fc

Please sign in to comment.