|
| 1 | +# How to quick start |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +This guide walks the user through the TRON Quickstart (v2.0.0) image setup. The image exposes a Full Node, Solidity Node, and Event Server. |
| 6 | +Through TRON Quickstart, the user can deploy DApps, smart contracts, and interact via the TronWeb library. |
| 7 | + |
| 8 | +## Dependencies |
| 9 | + |
| 10 | +### Docker |
| 11 | + |
| 12 | +Please refer to the Docker official website to download and install the latest Docker version: |
| 13 | +* Docker Installation for Mac(https://docs.docker.com/docker-for-mac/install/) |
| 14 | +* Docker Installation for Windows(https://docs.docker.com/docker-for-windows/install/) |
| 15 | + |
| 16 | +### Node.JS Console |
| 17 | + This will be used to interact with the Full and Solidity Nodes via Tron-Web. |
| 18 | + Node.JS Console Download(https://nodejs.org/en/) |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | +## Getting the code with git |
| 23 | + |
| 24 | +* Use Git from the Terminal, 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. |
| 25 | +* develop branch: the newest code |
| 26 | +* master branch: more stable than develop. |
| 27 | +In the shell command, type: |
| 28 | +```bash |
| 29 | +git clone https://github.com/tronprotocol/java-tron.git |
| 30 | +git checkout -t origin/master |
| 31 | +``` |
| 32 | + |
| 33 | +* 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/)**. |
| 34 | + |
| 35 | +* If you'd rather not use Git, [Download the ZIP](https://github.com/tronprotocol/java-tron/archive/develop.zip) |
| 36 | + |
| 37 | +## Including java-tron as dependency |
| 38 | + |
| 39 | +* If you don't want to checkout the code and build the project, you can include it directly as a dependency |
| 40 | + |
| 41 | +**Using gradle:** |
| 42 | + |
| 43 | +``` |
| 44 | +repositories { |
| 45 | + maven { url 'https://jitpack.io' } |
| 46 | +} |
| 47 | +dependencies { |
| 48 | + implementation 'com.github.tronprotocol:java-tron:develop-SNAPSHOT' |
| 49 | +} |
| 50 | +``` |
| 51 | + |
| 52 | +**Using maven:** |
| 53 | + |
| 54 | +```xml |
| 55 | +... |
| 56 | +<repositories> |
| 57 | + <repository> |
| 58 | + <id>jitpack.io</id> |
| 59 | + <url>https://jitpack.io</url> |
| 60 | + </repository> |
| 61 | +</repositories> |
| 62 | +... |
| 63 | +<dependency> |
| 64 | + <groupId>com.github.tronprotocol</groupId> |
| 65 | + <artifactId>java-tron</artifactId> |
| 66 | + <version>develop-SNAPSHOT</version><!--You can use any of the tag/branch name available--> |
| 67 | +</dependency> |
| 68 | +``` |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +## Building from source code |
| 74 | + |
| 75 | +* Build in the Terminal |
| 76 | + |
| 77 | +```bash |
| 78 | +cd java-tron |
| 79 | +./gradlew build |
| 80 | +``` |
| 81 | + |
| 82 | + |
| 83 | +* Build in [IntelliJ IDEA](https://www.jetbrains.com/idea/) (community version is enough): |
| 84 | + |
| 85 | + **Please run ./gradlew build once to build the protocol files** |
| 86 | + |
| 87 | + 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. |
| 88 | + 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`. |
| 89 | + 3. IntelliJ will open the project and start gradle syncing, which will take several minutes, depending on your network connection and your IntelliJ configuration |
| 90 | + 4. Enable Annotations, `Preferences` -> Search `annotations` -> check `Enable Annotation Processing`. |
| 91 | + 5. After the syncing finished, select `Gradle` -> `Tasks` -> `build`, and then double click `build` option. |
| 92 | + |
0 commit comments