sqlcipher / android-database-sqlcipher

Android SQLite API based on SQLCipher
https://www.zetetic.net/sqlcipher/sqlcipher-for-android/
Other
2.73k stars 564 forks source link

Should SQLCIPHER_CFLAGS be optional or not? #614

Open brodybits opened 1 year ago

brodybits commented 1 year ago

It looks to me like SQLCIPHER_CFLAGS was documented as optional, but this changed in 310abc1391dc30fb619d5921ac32f060b1171c48

But it looks like this code still has some default C flags: https://github.com/sqlcipher/android-database-sqlcipher/blob/master/build.gradle#L88-L108

developernotes commented 1 year ago

Hi @brodybits,

You are correct, SQLCIPHER_CFLAGS is required for the build. I will remove the remnant default flags and in place provide an error message failing the build with the following message:

* What went wrong:
A problem occurred evaluating root project 'android-database-sqlcipher'.
> SQLCIPHER_CFLAGS environment variable must be specified and include at least '-DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2'
brodybits commented 1 year ago

Was there a special reason for removing the default SQLCIPHER_CFLAGS?

It looked like a nice convenience to me.

developernotes commented 1 year ago

Hi @brodybits,

The intention is to favor explicitness in the build. We do not rely on the previous default values for other SQLCipher for Android builds.