Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ gradle.properties
*.apk
*.ap_
*.jar
.externalNativeBuild

# files for the dex VM
*.dex
Expand Down
6 changes: 5 additions & 1 deletion JniBitmapOperationsLibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ android {
}
}


externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
}
}

/*
task buildNative(type: Exec, description: 'Compile JNI source via NDK') {
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,29 @@ Just import the whole cloned project and run the sample.

#### Further configuring and using as the library

#### Option 1
1. Add this repository as a git submodule. For these instructions we added in a folder named `AndroidJniBitmapOperations`
2. Add the following lines to your `settings.gradle` file

```
include ':JniBitmapOperationsLibrary'
project(':JniBitmapOperationsLibrary').projectDir = new File(settingsDir, '../AndroidJniBitmapOperations/JniBitmapOperationsLibrary')
```
3. Add the following lines to your top level `build.gradle` file inside the `buildscript` section. Replace the versions with whatever your project is using as needed.

```
// Variables for JniBitmapOperationsLibrary
ext.propCompileSdkVersion = 23
ext.propBuildToolsVersion = "27.0.3"
```
4. Add the following lines to your app `build.gradle` file inside the `dependancies` section

```
implementation project(':JniBitmapOperationsLibrary')
```

#### Option 2

1. Copy `JniBitmapOperationsLibrary.cpp` into `src/main/jni` directory:

![Studio folder structure](https://s3.amazonaws.com/uploads.hipchat.com/22412/120721/qZyoFrgpUnFmnHu/upload.png)
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.android.tools.build:gradle:3.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down