Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Multi sourceset amps #10

Merged
merged 27 commits into from
Apr 18, 2019
Merged

Multi sourceset amps #10

merged 27 commits into from
Apr 18, 2019

Conversation

vierbergenlars
Copy link
Member

@vierbergenlars vierbergenlars commented Apr 15, 2019

  1. Refactor the Amp task type to be more flexible:
    • Make config and web a CopySpec instead of a File pointing to the root directory to copy. This fixes Support configuring Amp task file properties with CopySpec #8
    • Make licenses, libs and deLibs a ConfigurableFileCollection so items can easily be added and removed from the collection without having to manipulate the list directly.
  2. Deprecate ampConfig configuration block, move configurations to sourceSets. Example
    • sourceSets is used by the java plugin to create multiple, (partially or fully) independent source trees. These are usually packaged in separate jars as well. Now, let's add an amp configuration to each sourceset that takes the jar that is created and puts it inside an amp. As with source sets as used by the java plugin, configurations and tasks are fully independent and prefixed with the sourceset name when it is not the main sourceset. The eu.xenit.amp plugin configures an amp for the main sourceset by default.
    • When no module.properties file exists, automatically generate a module.properties file based on the project configuration.
    • Configure a module.properties or file-mapping.properties file directly from your build.gradle
  3. Drop support for gradle < 4.10, so we can start using gradle properties and providers and lazy configuration of tasks.

All old properties on Amp and ampConfig are still available and configure the new properties and configuration when they are used. Linking for ampConfig is provided by and isolated in a LegacyAmpPlugin that can be disabled later.
Using deprecated properties or configuration logs a warning. A stacktrace to the usage of a deprecated function is added to the warning when running gradle with --info.

…mps configured, but always configure the main sourceset with alfrescoProvided
…cause convention objects do not seem to work properly here
 * Make libs, licenses a ConfigurableFileCollection
 * Make moduleProperties, fileMappingProperties a RegularFileProperty
 * Add deBundles property and deprecate de() copyspec
 * eu.xenit.gradle.alfrescosdk.deprecation=false to disable deprecations
 * eu.xenit.gradle.alfrescosdk.deprecation.stacktrace to force
enable/disable stacktraces for deprecations (default shows stacktraces
when running in INFO mode)
 * eu.xenit.gradle.alfrescosdk.deprecation.warnAlways to warn on every
occurence of a deprecation warning (default is to only show the first
warning) When stacktraces are enabled, all warnings are always shown.
@vierbergenlars vierbergenlars added the enhancement New feature or request label Apr 16, 2019
@vierbergenlars vierbergenlars marked this pull request as ready for review April 16, 2019 06:06
@thijslemmens thijslemmens merged commit e4135a5 into master Apr 18, 2019
@vierbergenlars vierbergenlars deleted the multi-sourceset-amps-bis branch April 18, 2019 17:05
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support configuring Amp task file properties with CopySpec
2 participants