Skip to content

Commit a388a03

Browse files
Add section to README for ProGuard rules and guidance
1 parent da58583 commit a388a03

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ The rest of your code may not need any changes.
126126

127127
An article covering both integration of SQLCipher into an Android application as well as building the source can be found [here](https://www.zetetic.net/sqlcipher/sqlcipher-for-android/).
128128

129+
### ProGuard
130+
131+
For applications which utilize ProGuard, a few additional rules must be included when using SQLCipher for Android. These rules instruct ProGuard to omit the renaming of the internal SQLCipher classes which are used via lookup from the JNI layer. It is worth noting that since SQLCipher or Android is based on open source code there is little value in obfuscating the library anyway. The more important use of ProGuard is to protect your application code and business logic.
132+
133+
``
134+
-keep,includedescriptorclasses class net.sqlcipher.** { *; }
135+
-keep,includedescriptorclasses interface net.sqlcipher.** { *; }
136+
```
137+
129138
### Building
130139
131140
In order to build `android-database-sqlcipher` from source you will need both the Android SDK, Gradle, and the Android NDK. We currently recommend using Android NDK version `r20`. To complete the `make` command, the `ANDROID_NDK_HOME` environment variable must be defined which should point to your NDK root. Once you have cloned the repo, change directory into the root of the repository and run the following commands:

0 commit comments

Comments
 (0)