This codebase holds the business logic for the display of commercial components, so that it can be shared across all Guardian platforms: web and app.
- It will be included in all frontend deployments that show commercial components
- It will be included in mapi deployments
- It won't make any calls to external services
- Its only dependencies are the capi model and the facia model
Add the library as dependency:
libraryDependencies += "com.gu" %% "commercial-shared" % "<x.y.z>"
- Find branding for a given content item, section, tag or container: See branding tests.
- Build display ad targeting for a given content item, section or tag: See ad targeting tests.
Run bin/activator
Run the sbt publishLocal
task.
This will generate a local snapshot artefact.
Add the snapshot version as a dependency of the downstream project.
See: https://github.com/guardian/gha-scala-library-release-workflow/blob/main/docs/making-a-release.md