diff --git a/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/library/AndroidLibrary.java b/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/library/AndroidLibrary.java index 119a34db..c9e717b2 100644 --- a/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/library/AndroidLibrary.java +++ b/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/library/AndroidLibrary.java @@ -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; @@ -40,4 +41,8 @@ default void dependencies(Action action) { default void buildTypes(Action action) { action.execute(getBuildTypes()); } + + // TODO: We really want to model a list of consumer proguard files here, but can't yet + @Restricted + Property getConsumerProguardFile(); } diff --git a/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/library/StandaloneAndroidLibraryPlugin.java b/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/library/StandaloneAndroidLibraryPlugin.java index 769ebfe6..9853fbc2 100644 --- a/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/library/StandaloneAndroidLibraryPlugin.java +++ b/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/library/StandaloneAndroidLibraryPlugin.java @@ -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")