-
Notifications
You must be signed in to change notification settings - Fork 568
/
build.gradle
99 lines (96 loc) · 3.56 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
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 = "support@zetetic.net"
mavenDeveloperOrganization = "Zetetic LLC"
mavenDeveloperUrl = "https://www.zetetic.net"
minimumAndroidSdkVersion = 21
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')
&& project.sqlcipherCFlags?.trim()
&& project.sqlcipherCFlags?.contains('SQLITE_HAS_CODEC')
&& project.sqlcipherCFlags?.contains('SQLITE_TEMP_STORE')) {
sqlcipherCFlags = "${sqlcipherCFlags}"
} else {
if(!project.gradle.startParameter.taskNames.toString().contains('clean')){
throw new InvalidUserDataException("SQLCIPHER_CFLAGS environment variable must be specified and include at least '-DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2'")
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}