Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Issues
  • #63
Closed
Open
Issue created Nov 01, 2013 by Administrator@rootContributor

java_library: provide a way to specify non transitive dependencies

Created by: davido

When building a plugin (P) for an existing system (S) which exposes an API in form of library (A) the following idiom is used:

P depends on A but java_binary P must not contain the content of A. That's because P is deployed in S and all artifacts from A are obviously exist.

Currently it is not possible to express that idiom with Buck's native java_library.

Sugestion: extend java_library with new parameter: compiled_deps.

Alternatively provide a new finction java_library2 that exposes that parameter.

Working use case: java_library2() that exposes compile_deps parameter in:

https://github.com/davido/gerrit-reviewers-plugin/blob/master/lib/build.defs

To see the difference between call to java_library2 and java_library try to replace it on line 61: in gerrit_plugin() definition:

java_library( name = name + '__plugin', srcs = srcs, resources = resources, deps = deps + ['//:%s-lib' % type], )

With the outcome that reviewers.jar would contain the whole gerrit-plugin-api.jar and not only 4 classes it adds.

Assignee
Assign to
Time tracking