This repository has been archived by the owner on Jan 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 172
/
build.gradle
120 lines (106 loc) · 3.59 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
115
116
117
118
119
120
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.3'
classpath files ('libs/gradle-witness.jar')
}
}
apply plugin: 'com.android.application'
apply plugin: 'witness'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.duckduckgo.mobile.android"
minSdkVersion 16
targetSdkVersion 23
versionCode 101
versionName "3.1.1"
}
repositories {
mavenCentral()
}
dependencies {
compile 'ch.acra:acra:4.5.0'
compile ('com.android.support:recyclerview-v7:23.1.1') {
exclude module: 'support-v4'
exclude module: 'support-annotations'
}
compile 'com.squareup:otto:1.3.8'
compile 'com.squareup.picasso:picasso:2.5.2'
compile project(':libs:OnionKit:libnetcipher')
compile ('com.android.support:appcompat-v7:23.1.1') {
exclude module: 'support-v4'
}
compile project(':libs:android-support-v4-preferencefragment')
}
dependencyVerification {
verify = [
'ch.acra:acra:b46be215fefd703fe91bd8c2a9f59ba87f28924316c556468c5e6141d1fc87a7',
'com.android.support:recyclerview-v7:7606373da0931a1e62588335465a0e390cd676c98117edab29220317495faefd',
'com.squareup:otto:13e2c8f5782de514cb161a1e03cdf394a6933431ce1aa2391f6289005b5a250c',
'com.squareup.picasso:picasso:233e18f59d25b6aff475df1e01a0661677f88af73838a27eb23aa21b96a3ac6e',
'com.android.support:appcompat-v7:0a8762214382b7e8d4b989b4ac10b5c846b957d767ccb7bccbc6be5afa885a82',
]
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
signingConfigs {
release
}
buildTypes {
debug {
debuggable true
jniDebuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
signingConfig signingConfigs.release
}
}
lintOptions {
abortOnError false
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
def alignedOutputFile = output.outputFile
if (variant.buildType.zipAlignEnabled) {
if(variant.buildType.name.contains("release")) {
output.outputFile = new File(alignedOutputFile.parent, "DuckDuckGo-release.apk")
} else if(variant.buildType.name.contains("debug")) {
output.outputFile = new File(alignedOutputFile.parent, "DuckDuckGo-debug.apk")
}
}
}
}
def Properties props = new Properties()
def propFile = new File('/Users/jenkins/jenkins_static/duckduckgo_android/ddg_android_build.properties')
if (propFile.exists()){
props.load(new FileInputStream(propFile))
if (props!=null && props.containsKey('key.store') && props.containsKey('key.store.password') &&
props.containsKey('key.alias') && props.containsKey('key.alias.password')) {
android.signingConfigs.release.storeFile = file(props['key.store'])
android.signingConfigs.release.storePassword = props['key.store.password']
android.signingConfigs.release.keyAlias = props['key.alias']
android.signingConfigs.release.keyPassword = props['key.alias.password']
} else {
println 'signing.properties found but some entries are missing'
android.buildTypes.release.signingConfig = null
}
} else {
println 'signing.properties not found'
android.buildTypes.release.signingConfig = null
}
}