Update JDK prebuilts

This builds 1.8.0_152-release-1343-b01 from JetBrains' sources in
platform/external/jetbrains/jdk8u*, at revisions:

$repo forall -p -c git rev-parse HEAD

project external/jetbrains/jdk8u/
f4cdfa7543492aa1fe812d2aa3fb64b5117e6558

project external/jetbrains/jdk8u_corba/
c55762da91519a85fb2fd0b4f415735a12cc4888

project external/jetbrains/jdk8u_hotspot/
0a21b5da97d21462acf2ec12cbc20ee1f3dcf91d

project external/jetbrains/jdk8u_jaxp/
ad06f386190d159fe7bc8202b3abae2f1b218ecd

project external/jetbrains/jdk8u_jaxws/
1608370faaf8ca1655f5442d66d2cfd6282747c7

project external/jetbrains/jdk8u_jdk/
b7af428ea81ba250cb516473df298af44d67c8d1

project external/jetbrains/jdk8u_langtools/
3897806126950e89f10fca7d59be77686275a88c

project external/jetbrains/jdk8u_nashorn/
45faba88ae10e979db10142c68d02d986018010a

Fixes: 78506682
Test: existing
Change-Id: I0400cf720c852ce804555cea2dde789ccfdbcd86
199 files changed
tree: 417a24bb241bdef29cf03772534b25c4751fe937
  1. linux/
  2. mac/
  3. win32/
  4. win64/
  5. .gitignore
  6. BUILD
  7. README.md
README.md

Importing upstream changes

This document describes how to import changes from upstream repo (https://github.com/JetBrains/jdk8u*.git). Before doing these, you need forge-author, forge-committer and direct-push permissions for the relevant projects in jetbrains-master-mirror and jetbrains-master-mirror-osx branches.

Overview

JetBrains's projects have two branches - master and master-osx that we need to track. The master branch is used for linux and windows. The master-osx branch is used for mac. These map to jetbrains-master-mirror and jetbrains-master-mirror-osx respectively in our tree. No change should be made directly to these branches and they should track the upstream bit-for-bit. After importing the changes from jetbrains into these mirror branches, we can merge them into studio-master-dev and studio-master-dev-osx. Any changes made by us, should be made to studio-master-dev.

There is an auto-merger from studio-master-dev to studio-master-dev-osx. So, any change made should be available for both branches.

Steps

  • Get the sources by cloning the repo
repo init -u persistent-https://googleplex-android.git.corp.google.com/platform/manifest -b openjdk
repo sync  # Do not use '-c' here
  • Create a script called merge.sh with the following contents and grant it execute permissions:
#!/bin/bash
PROJECT_NAME=$(basename $REPO_PROJECT)

# Make sure we're in a clean state.
git checkout aosp/studio-master-dev # to make sure local_copy isn't checked out
git branch -D local_copy local_copy-osx

# Fetch changes and push to jetbrains-master-mirror.
git fetch https://github.com/JetBrains/$PROJECT_NAME.git master:local_copy
git fetch https://github.com/JetBrains/$PROJECT_NAME.git master-osx:local_copy-osx
git push aosp local_copy:refs/heads/jetbrains-master-mirror
git push aosp local_copy-osx:refs/heads/jetbrains-master-mirror-osx

# Merge the mirror into studio-master-dev and upload to gerrit
COMMIT_MSG="Merge 'jetbrains-master-mirrorSUFFIX' into studio-master-devSUFFIX" # edit as needed.
git branch -D studio-master-dev studio-master-dev-osx
git checkout -b studio-master-dev -t aosp/studio-master-dev
git merge -m "${COMMIT_MSG//SUFFIX/}" local_copy
repo upload --br=studio-master-dev $REPO_PROJECT
  • Run:
repo forall -c ./merge.sh # assuming merge.sh is in the current dir.
  • The above should create a merge CL per project that you can review in gerrit and submit.

  • There is an auto-merger from studio-master-dev to studio-master-dev-osx. Once the merge submitted above has merged into studio-master-dev-osx, continue with the following steps.

  • Create another file called merge2.sh with the followning contents and grant it execute permissions:

#!/bin/bash
COMMIT_MSG="Merge 'jetbrains-master-mirrorSUFFIX' into studio-master-devSUFFIX" # edit as needed.
git checkout -b studio-master-dev-osx -t aosp/studio-master-dev-osx
git merge -m "${COMMIT_MSG//SUFFIX/-osx}" local_copy-osx
repo upload --br=studio-master-dev-osx -D studio-master-dev-osx $REPO_PROJECT
  • Run:
repo forall -c ./merge2.sh
  • This should generate more CLs for you to merge through gerrit.

ProTip

You can add the following lines to ~/.gitconfig to skip “are you sure you want to upload” question from repo.

[review "https://android-review.googlesource.com/"]
        autoupload = true

Building

  • TODO: add instructions to build linux and win binaries.
  • To build mac binaries, checkout the project and sync (don't use the ‘-c’ flag when syncing).
  • Checkout the mac branch: repo forall -c git checkout aosp/studio-master-dev-osx.
  • You can now build the mac binaries.
  • To build from the internal tree, checkout the tree in the same way as aosp.
  • For mac binaries run the following after checking out the tree repo forall -c git checkout goog/mirror-studio-master-dev-osx