polyforest / acornui-gradle

A bundle of Gradle plugins that helps build Acorn UI projects with ease.
Apache License 2.0
0 stars 0 forks source link

As an Acorn UI developer, I'd like to merge resources based on dependencies, not based on assumptions. #48

Open fuzzyweapon opened 5 years ago

fuzzyweapon commented 5 years ago

Currently we have a dirty assumption that every subproject (module) in a consumer's Gradle build aside from the app module and the builder module should contribute resources to the app module (from the common and target source sets).

This is gross.

We should be leveraging dependencies in the MPP plugin's model to get the right resources. This will ensure sanitized builds and enable consumers to have multiple apps in a single gradle multi-project.

NOTE TLDR, please do not mirror the way the MPP plugin handles resources. Instead, if possible, register the resource directories /as/ resource directories.

MPP resource handling does not seem to add common module resource directories as resource directories of its targets. Right now, benefits of this are unclear to me. Instead, they simply have the processResources task take two inputs. To me this is a poor solution as it buries model information in implementation details. Tasks can change from build to build, consumers can rename them, and they require identification based on class+name (string). Task configuration provided by a plugin that is required to execute after project evaluation would break if consumers wanted to rename their task (which typically takes place during the task configuration phase, prior to after evaluation action execution).

fuzzyweapon commented 5 years ago

Transferring to polyforest/acornui-gradle-plugin to be addressed by plugin.