-
Notifications
You must be signed in to change notification settings - Fork 567
/
Copy pathbuild.gradle
114 lines (111 loc) · 4.12 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
buildscript {
repositories {
google()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "gradle.plugin.org.ec4j.gradle:editorconfig-gradle-plugin:0.0.3"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
ext {
if(project.hasProperty('sqlcipherAndroidClientVersion')) {
clientVersionNumber = "${sqlcipherAndroidClientVersion}"
} else {
clientVersionNumber = "UndefinedBuildNumber"
}
mavenPackaging = "aar"
mavenGroup = "net.zetetic"
mavenArtifactId = "android-database-sqlcipher"
mavenLocalRepositoryPrefix = "file://"
if(project.hasProperty('publishLocal') && publishLocal.toBoolean()){
mavenSnapshotRepositoryUrl = "outputs/snapshot"
mavenReleaseRepositoryUrl = "outputs/release"
} else {
mavenLocalRepositoryPrefix = ""
mavenSnapshotRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots"
mavenReleaseRepositoryUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
}
if(project.hasProperty('publishSnapshot') && publishSnapshot.toBoolean()){
mavenVersionName = "${clientVersionNumber}-SNAPSHOT"
} else {
mavenVersionName = "${clientVersionNumber}"
}
if(project.hasProperty('nexusUsername')){
nexusUsername = "${nexusUsername}"
}
if(project.hasProperty('nexusPassword')){
nexusPassword = "${nexusPassword}"
}
mavenPomDescription = "SQLCipher for Android is a plugin to SQLite that provides full database encryption."
mavenPomUrl = "https://www.zetetic.net/sqlcipher"
mavenScmUrl = "https://github.com/sqlcipher/android-database-sqlcipher.git"
mavenScmConnection = "scm:git:https://github.com/sqlcipher/android-database-sqlcipher.git"
mavenScmDeveloperConnection = "scm:git:https://github.com/sqlcipher/android-database-sqlcipher.git"
mavenLicenseUrl = "https://www.zetetic.net/sqlcipher/license/"
mavenDeveloperName = "Zetetic Support"
mavenDeveloperEmail = "[email protected]"
mavenDeveloperOrganization = "Zetetic LLC"
mavenDeveloperUrl = "https://www.zetetic.net"
minimumAndroidSdkVersion = 19
minimumAndroid64BitSdkVersion = 21
targetAndroidSdkVersion = 26
compileAndroidSdkVersion = 26
mainProjectName = "android-database-sqlcipher"
nativeRootOutputDir = "${projectDir}/${mainProjectName}/src/main"
if(project.hasProperty('sqlcipherRoot')) {
sqlcipherDir = "${sqlcipherRoot}"
}
if(project.hasProperty('opensslAndroidNativeRoot') && "${opensslAndroidNativeRoot}") {
androidNativeRootDir = "${opensslAndroidNativeRoot}"
} else {
androidNativeRootDir = "${nativeRootOutputDir}/external/android-libs"
}
if(project.hasProperty('opensslRoot')) {
opensslDir = "${opensslRoot}"
}
if(project.hasProperty('debugBuild') && debugBuild.toBoolean()) {
otherSqlcipherCFlags = "-fstack-protector-all"
ndkBuildType="NDK_DEBUG=1"
} else {
otherSqlcipherCFlags = "-DLOG_NDEBUG -fstack-protector-all"
ndkBuildType="NDK_DEBUG=0"
}
if(project.hasProperty('sqlcipherCFlags')) {
sqlcipherCFlags = "${sqlcipherCFlags}"
} else {
sqlcipherCFlags = "-DSQLITE_HAS_CODEC " +
"-DSQLITE_SOUNDEX " +
"-DHAVE_USLEEP=1 " +
"-DSQLITE_MAX_VARIABLE_NUMBER=99999 " +
"-DSQLITE_TEMP_STORE=3 " +
"-DSQLITE_THREADSAFE=1 " +
"-DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 " +
"-DNDEBUG=1 " +
"-DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 " +
"-DSQLITE_ENABLE_LOAD_EXTENSION " +
"-DSQLITE_ENABLE_COLUMN_METADATA " +
"-DSQLITE_ENABLE_UNLOCK_NOTIFY " +
"-DSQLITE_ENABLE_RTREE " +
"-DSQLITE_ENABLE_STAT3 " +
"-DSQLITE_ENABLE_STAT4 " +
"-DSQLITE_ENABLE_JSON1 " +
"-DSQLITE_ENABLE_FTS3_PARENTHESIS " +
"-DSQLITE_ENABLE_FTS4 " +
"-DSQLITE_ENABLE_FTS5 " +
"-DSQLCIPHER_CRYPTO_OPENSSL " +
"-DSQLITE_ENABLE_DBSTAT_VTAB"
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}