Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rmtheis committed Apr 20, 2018
1 parent e2bea65 commit 5c0b8e3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 11 deletions.
41 changes: 31 additions & 10 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ AAR as an external dependency in your app project. To start the build, import
the root directory of this project into Android Studio as an existing Android
Studio project, or follow the instructions below to build on the command line.

Note: When building from Android Studio, you may need to set the path to your
NDK installation in the Project Structure dialog (File->Project Structure).

## _Android Studio and Gradle_
## _Building with Android Studio_

The Gradle build uses the gradle-stable plugin and the Android NDK to
build the Tesseract and Leptonica native C/C++ code through a call to
`ndk-build` in `build.gradle`. After building, the AAR file that is generated
may be [imported][aar-import] into your app project as a dependency on a local
binary package.
`ndk-build` in `build.gradle`. In Android Studio, use

Build -> Rebuild Project

to build or rebuild the project.

Note: When building from Android Studio, you may need to set the path to your
NDK installation in the Project Structure dialog (File->Project Structure).

To build the project from the command line:
## _Building on the Command Line_

_On Mac/Linux:_

Expand Down Expand Up @@ -44,7 +46,20 @@ Run the following commands:
cd tess
gradlew assemble

### Testing
# Importing

After building, the code that is generated may be imported into your app
project in Android Studio as a module using

File -> New -> Import Module -> `tess-two` folder

and then adding the dependency to your app module build.gradle:

dependencies {
implementation project(':tess-two')
}

# Testing

_On Mac/Linux:_

Expand All @@ -58,4 +73,10 @@ _On Windows:_

Note that some tests will fail due to existing issues.

[aar-import]:http://stackoverflow.com/a/28816265/667810
# Removing

If you want to remove your app's dependency on the tess-two module, reverse
the import process by removing the module using the Project Structure dialog
(File->Project Structure), manually deleting the tess-two subfolder from your
app project folder, and removing the tess-two reference from your app module
build.gradle.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To use tess-two from your app, edit your app module's `build.gradle` file to add
tess-two as an external dependency:

dependencies {
compile 'com.rmtheis:tess-two:8.0.0'
implementation 'com.rmtheis:tess-two:8.0.0'
}

[Javadoc][javadoc] is available.
Expand Down

0 comments on commit 5c0b8e3

Please sign in to comment.