Skip to content

Commit

Permalink
add build instructions and remove AAR instructions from rough.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sayantan-kgp committed Mar 13, 2021
1 parent aae50da commit fa002da
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 8 deletions.
33 changes: 33 additions & 0 deletions build_instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## Build instructions (in Linux terminal):
1. Make sure you have `git` installed on your system. Type `git --version` to check installed version. If not installed, refer to your distribution's package manager to check how to install it.
2. Change to your preferred directory. Here we are assuming your home directory on Linux.
```
cd ~
```
3. Clone this repository. Then change directory into the repository.
```
git clone https://github.com/SayantanRC/FileX.git
cd FileX
```
4. You can now directly use this directory in your projects.
- To add it as an external library, open your project in Android Studio.
- Open `settings.gradle` file.
- Add the below lines:
```
include ':FileX'
project(':FileX').projectDir=new File('/home/[USERNAME]/FileX')
```
where `[USERNAME]` is your Linux username without square brackets.
- In your app level `build.gradle` file, add the following in dependencies:
```
implementation project(path: ':FileX')
```
- Then Gradle sync.
- Advantage of the is that you can again cd to the `FileX` cloned repository (`cd ~/FileX`) and pull new changes/commits anytime you wish (`git pull`) without waiting for releases on jitpack or anywhere.
5. However, if you with to build AAR, use the following commands. Here we are assuming your `android-studio` directory is under home and you are using the Java runtime provided by it.
```
cd ~/FileX
export JAVA_HOME="$HOME/android-studio/jre/"
./gradlew assembleRelease -xtest -xlint
```
The compiled AAR is located under the FileX directory -> build/outputs/aar/FileX-release.aar
10 changes: 2 additions & 8 deletions src/main/java/rough.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
To regenerate tables from `doc_assets`: https://www.tablesgenerator.com/markdown_tables#

To build AAR: (AAR is located under - build/outputs/aar/FileX-release.aar)
```
export JAVA_HOME="$HOME/android-studio/jre/"
./gradlew assembleRelease -xtest -xlint
```

NOTE TO MYSELF:
To regenerate tables from `doc_assets`: https://www.tablesgenerator.com/markdown_tables#

0 comments on commit fa002da

Please sign in to comment.