Skip to content

Commit

Permalink
Merge pull request #84 from gradle/tt/support-proguard-minimal
Browse files Browse the repository at this point in the history
Add minimal support for necessary proguard file property for NiA
  • Loading branch information
tresat authored May 30, 2024
2 parents 1651184 + aec010b commit 3aac942
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import org.gradle.api.Action;
import org.gradle.api.experimental.android.AndroidSoftware;
import org.gradle.api.provider.Property;
import org.gradle.api.tasks.Nested;
import org.gradle.declarative.dsl.model.annotations.Configuring;
import org.gradle.declarative.dsl.model.annotations.Restricted;
Expand All @@ -40,4 +41,8 @@ default void dependencies(Action<? super AndroidLibraryDependencies> action) {
default void buildTypes(Action<? super AndroidLibraryBuildTypes> action) {
action.execute(getBuildTypes());
}

// TODO: We really want to model a list of consumer proguard files here, but can't yet
@Restricted
Property<String> getConsumerProguardFile();
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ private void linkDslModelToPlugin(Project project, AndroidLibrary dslModel) {
if (NiaSupport.isNiaProject(project)) {
NiaSupport.configureNiaLibrary(project, dslModel);
}

ifPresent(dslModel.getConsumerProguardFile(), android.getDefaultConfig()::consumerProguardFile);
}

@SuppressWarnings("UnstableApiUsage")
Expand Down

0 comments on commit 3aac942

Please sign in to comment.