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
  • Merge requests
  • !1005

Add rt.jar to java bootclasspath

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/airbnb/sean/rt_jar_classpath into master Nov 11, 2016
  • Overview 7
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: seanabraham

This is in the same vein as https://github.com/facebook/buck/pull/732.

This adds rt.jar to the javac classpath so that buck can build java 8 sources correctly. This is needed, for example, with the use of retrolambda in an Android project.

Previously we worked around this by adding something like the following to our android_library rules (a la https://github.com/uber/okbuck/pull/81):

 extra_arguments = [
  ...
  '-bootclasspath',
  '/Users/some_user/path/to/android-24/android.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/rt.jar',
 ],

The problem with this is that the absolute paths in the BUCK files break caching as the jvm arguments are part of definition of the rule key as far as I can tell.

cc @kageiit @felipecsl

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/airbnb/sean/rt_jar_classpath