Skip to content

Commit

Permalink
Correct rebase errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tresat committed May 23, 2024
1 parent 23fb1df commit fd9ac12
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ protected void linkBuildTypeDependencies(BuildType buildType, AndroidSoftwareDep
configurations.getByName(name + "RuntimeOnly").fromDependencyCollector(dependencies.getRuntimeOnly());
}


protected <T> void ifPresent(Property<T> property, Action<T> action) {
if (property.isPresent()) {
action.execute(property.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.gradle.api.attributes.AttributeContainer;
import org.gradle.api.experimental.android.AbstractAndroidSoftwarePlugin;
import org.gradle.api.experimental.android.AndroidSoftware;
import org.gradle.api.experimental.android.nia.NiaSupport;
import org.gradle.api.internal.plugins.software.SoftwareType;

import java.util.Objects;
Expand Down Expand Up @@ -57,10 +58,13 @@ 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 (NiaSupport.isNiaProject(project)) {
// 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);

NiaSupport.configureNiaApplication(project, dslModel);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.gradle.api.artifacts.ConfigurationContainer;
import org.gradle.api.experimental.android.AbstractAndroidSoftwarePlugin;
import org.gradle.api.experimental.android.AndroidSoftware;
import org.gradle.api.experimental.android.nia.NiaSupport;
import org.gradle.api.internal.plugins.software.SoftwareType;

/**
Expand Down Expand Up @@ -38,6 +39,11 @@ public void apply(Project project) {

// After AGP creates configurations, link deps to the collectors
linkCommonDependencies(dslModel.getDependencies(), project.getConfigurations());

// TODO: All this configuration should be moved to the NiA project
if (NiaSupport.isNiaProject(project)) {
NiaSupport.configureNiaApplication(project, dslModel);
}
}

/**
Expand Down

0 comments on commit fd9ac12

Please sign in to comment.