-
Notifications
You must be signed in to change notification settings - Fork 1.6k
docs: fix outdated content across docs/ and root-level docs/scripts #6662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Little-Peony
wants to merge
9
commits into
tronprotocol:develop
Choose a base branch
from
Little-Peony:clean_docs
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
512cd16
docs: update outdated content across all six doc files
Little-Peony 0cdea68
docs: set recommended JVM heap to -Xms2g -Xmx9g
Little-Peony fedb29e
docs: fix code accuracy issues found by codebase verification
Little-Peony fb188d6
docs: fix missing api.proto import and clarify auto-registration
Little-Peony 99158e5
docs: remove Windows references and fix deprecation note in deploymen…
Little-Peony 4f5ad58
chore(scripts): fix shell script bugs and modernize JVM flags
Little-Peony e15289f
docs: audit and update root-level docs and scripts
Little-Peony 7e55a0a
chore: merge clean_scripts into clean_docs
Little-Peony 4883e42
chore(scripts): add comment explaining G1GC replacement for CMS
Little-Peony File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,81 +1,54 @@ | ||
| # How to Build | ||
|
|
||
| ## Prepare dependencies | ||
| ## Hardware Requirements | ||
|
|
||
| * JDK 1.8 (JDK 1.9+ are not supported yet) | ||
| * On Linux Ubuntu system (e.g. Ubuntu 16.04.4 LTS), ensure that the machine has [__Oracle JDK 8__](https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04), instead of having __Open JDK 8__ in the system. If you are building the source code by using __Open JDK 8__, you will get [__Build Failed__](https://github.com/tronprotocol/java-tron/issues/337) result. | ||
| * Open **UDP** ports for connection to the network | ||
| * **Minimum** 2 CPU Cores | ||
| For mainnet deployment, refer to the [Hardware Requirements for Mainnet](README.md#hardware-requirements-for-mainnet) table in the README. | ||
|
|
||
| ## Build and Deploy automatically using scripts | ||
| For compilation only (not running a node), a minimum of **4 CPU cores, 16 GB RAM, and 10 GB free disk space** is sufficient. | ||
|
|
||
| - Please take a look at the [Tron Deployment Scripts](https://github.com/tronprotocol/TronDeployment) repository. | ||
| ## Prerequisites, Source Code, and Console Build | ||
|
|
||
| ## Getting the code with git | ||
| See [Building the Source Code](README.md#building-the-source-code) in the README for: | ||
| - Hardware/OS/JDK prerequisites | ||
| - Dependency installation (`install_dependencies.sh`) | ||
| - `git clone` and `./gradlew build` instructions | ||
|
|
||
| * Use Git from the console, see the [Setting up Git](https://help.github.com/articles/set-up-git/) and [Fork a Repo](https://help.github.com/articles/fork-a-repo/) articles. | ||
| * `develop` branch: the newest code | ||
| * `master` branch: more stable than develop. | ||
| In the shell command, type: | ||
| ```bash | ||
| git clone https://github.com/tronprotocol/java-tron.git | ||
| git checkout -t origin/master | ||
| ``` | ||
| ## Building in IntelliJ IDEA | ||
|
|
||
| * For Mac, you can also install **[GitHub for Mac](https://mac.github.com/)** then **[fork and clone our repository](https://guides.github.com/activities/forking/)**. | ||
| Run `./gradlew build -x test` once from the terminal before opening the project to generate protobuf sources. | ||
|
|
||
| * If you'd rather not use Git, **[Download the ZIP](https://github.com/tronprotocol/java-tron/archive/develop.zip)** | ||
| 1. Open IntelliJ IDEA and select **File → Open**, locate the `java-tron` directory, and click **Open**. | ||
| 2. When prompted, select **Trust Project**. | ||
| 3. Wait for Gradle sync to complete. | ||
| 4. In **Settings → Build, Execution, Deployment → Compiler → Annotation Processors**, enable **Annotation Processing**. | ||
| 5. In the **Gradle** panel, navigate to **Tasks → build** and double-click **build**. | ||
|
|
||
| ## Including java-tron as dependency | ||
| ## Including java-tron as a Dependency | ||
|
|
||
| If you don't want to checkout the code and build the project, you can include it directly as a dependency. | ||
| **Gradle:** | ||
|
|
||
| **Using gradle:** | ||
|
|
||
| ``` | ||
| ```groovy | ||
| repositories { | ||
| maven { url 'https://jitpack.io' } | ||
| maven { url 'https://jitpack.io' } | ||
| } | ||
| dependencies { | ||
| implementation 'com.github.tronprotocol:java-tron:develop-SNAPSHOT' | ||
| implementation 'com.github.tronprotocol:java-tron:develop-SNAPSHOT' | ||
| } | ||
| ``` | ||
| **Using maven:** | ||
|
|
||
| **Maven:** | ||
|
|
||
| ```xml | ||
| <repositories> | ||
| <repository> | ||
| <id>jitpack.io</id> | ||
| <url>https://jitpack.io</url> | ||
| <repository> | ||
| <id>jitpack.io</id> | ||
| <url>https://jitpack.io</url> | ||
| </repository> | ||
| </repositories> | ||
|
|
||
| <dependency> | ||
| <groupId>com.github.tronprotocol</groupId> | ||
| <artifactId>java-tron</artifactId> | ||
| <version>develop-SNAPSHOT</version> | ||
| <!--You can use any of the tag/branch name available--> | ||
| </dependency> | ||
| ``` | ||
|
|
||
| ## Building from source code | ||
|
|
||
| - **Building using the console:** | ||
|
|
||
| ```bash | ||
| cd java-tron | ||
| ./gradlew build | ||
| ``` | ||
|
|
||
| - **Building using [IntelliJ IDEA](https://www.jetbrains.com/idea/) (community version is enough):** | ||
|
|
||
| **Please run `./gradlew build` once to build the protocol files** | ||
|
|
||
| 1. Start IntelliJ. | ||
| Select `File` -> `Open`, then locate to the java-tron folder which you have git cloned to your local drive. Then click `Open` button on the right bottom. | ||
| 2. Check on `Use auto-import` on the `Import Project from Gradle` dialog. Select JDK 1.8 in the `Gradle JVM` option. Then click `OK`. | ||
| 3. IntelliJ will import the project and start gradle syncing, which will take several minutes, depending on your network connection and your IntelliJ configuration | ||
| 4. Enable Annotations, `Preferences` -> Search `annotations` -> check `Enable Annotation Processing`. | ||
| 5. When the syncing finishes, select `Gradle` -> `Tasks` -> `build`, and then double click `build` option. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the rewrite, both build.md and run.md are mostly thin wrappers that point back to the README. Maintaining multiple files that say "see README" adds indirection for readers and maintenance burden (they can easily drift out of sync again — which is how they got stale in the first place).
Suggestion: consider removing build.md and run.md entirely, and moving the unique content (IntelliJ IDEA setup steps, jitpack dependency snippet) into the README or a CONTRIBUTING.md section. This would be a net reduction in maintenance surface.