Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 3.62 KB

File metadata and controls

65 lines (50 loc) · 3.62 KB

Requirements

  1. Environment
    1. Upgrading to newer versions of development environments
      1. Java
      2. Gradle
      3. Python
  2. Other

Environment

Language Version Package
Java Latest OpenJDK (OpenJDK with HotSpot)
Python Latest 3.x N/A

I recommended using VS Code.

If you are on Windows, I highly recommend installing msys2. After installation, run the following from the msys2 shell:

pacman -Syu
pacman -S base-devel
pacman -S mingw-w64-x86_64-toolchain
pacman -S mingw-w64-x86_64-cmake

Upgrading to newer versions of development environments

Java

  1. Install latest version of Java: OpenJDK.
  2. On Windows, update the Path environment variable to point to new Java install location. Look out for JAVA_HOME env var, and javapath in the Path env var.
  3. Update build.gradle script (sourceCompatibility and targetCompatibility).
  4. Download and update the (latest) version of gradle compatible with the new version of Java.
  5. In Windows, update the Path environment variable to point to new gradle install location.
  6. In the repository root, from admin command prompt, run ./gradlew wrapper --gradle-version <new gradle version> --distribution-type=bin.
  7. Make sure distributionUrl in gradle/wrapper/gradle-wrapper.properties points to new gradle version.
  8. Delete .project and .classpath files.
  9. Delete all contents of bin directory.
  10. Close VSCode.
  11. Clear workspace cache.
  12. Restart VSCode.
  13. Make sure new .project and .classpath files have been generated. Verify that .classpath now points to the new version of Java. This may take a good few minutes.
  14. Run gradlew test and code coverage tasks.
  15. Update CI scripts (GitHub, appveyor, circle-ci, travis) to point to new Java version.
    1. For circle-ci, docker image tags can be viewed here.

Gradle

From the project root, run .\gradlew.bat wrapper --gradle-version=x.x.x --distribution-type=bin. For Linux, run gradlew from the root, instead of the .bat file. Use the desired version in the command. Verify that the distributionUrl field in the file gradle-wrapper.properties has been updated to reflect the correct version. [Reference]

Python

  1. Install latest version of Python.
  2. Run tasks for python tests, coverage reports and problems list.
  3. Update CI scripts (appveyor, circle-ci, travis) to point to new Python version.

Other

  1. For those who may not wish to use VSCode and instead prefer a simple text editor
    1. There is a Makefile at the root of this repository for building and running tests.
    2. Instructions will be provided at a later time for command line usage to add new problems, run tests, etc. [Ref]
  2. I do not recommend using any sort of bloated IDE. They tend to add a lot of files simply for their specific plumbing.
  3. Added a new submodule: git submodule add https://github.com/computer-science-engineering/bytebytego-courses_system-design-interview src\ByteByteGo\Courses\system-design-interview