-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathbuild.gradle
More file actions
123 lines (104 loc) · 3.07 KB
/
build.gradle
File metadata and controls
123 lines (104 loc) · 3.07 KB
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
121
122
123
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'org.ajoberstar:gradle-git:0.2.3'
}
}
ext {
supportVersion = '25.0.1'
}
import org.ajoberstar.gradle.git.tasks.GitClone
task cloneCjdns(type: GitClone) {
def destination = file("cjdns-src")
uri = "https://github.com/benhylau/cjdns"
// Use this repo until patch is merged in cjdelisle/cjdns
destinationPath = destination
bare = false
enabled = !destination.exists() // Clone only on first run
}
task buildCjdns(type: Exec) {
workingDir file("cjdns-src")
commandLine file("cjdns-src/android_do")
}
task copyNativeArtifacts(type: Copy) {
from 'cjdns-src/build_android/out/*'
into 'src/main/assets/'
}
apply plugin: 'com.android.application'
apply plugin: 'checkstyle'
android {
buildToolsVersion "25.0.1"
compileSdkVersion 25
defaultConfig {
minSdkVersion 9
targetSdkVersion 25
versionCode 1
versionName "1.0.0-SNAPSHOT"
}
sourceSets.main {
jni.srcDirs = []
jniLibs.srcDir 'src/main/libs'
}
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
lintOptions {
disable 'InvalidPackage'
}
}
afterEvaluate {
if (COMPILE_CJDNS_NATIVE_ARTIFACTS.toBoolean()) {
android.applicationVariants.all { variant ->
variant.javaCompiler.dependsOn(cloneCjdns)
}
}
}
cloneCjdns.finalizedBy(buildCjdns)
buildCjdns.finalizedBy(copyNativeArtifacts)
dependencies {
compile "com.android.support:support-v4:$supportVersion"
compile "com.android.support:appcompat-v7:$supportVersion"
compile "com.android.support:cardview-v7:$supportVersion"
compile "com.android.support:recyclerview-v7:$supportVersion"
compile "com.android.support:preference-v7:$supportVersion"
compile "com.android.support:preference-v14:$supportVersion"
compile 'com.jakewharton:butterknife:6.0.0'
compile 'com.joanzapata.android:android-iconify:1.0.9'
compile('com.github.afollestad.material-dialogs:core:0.8.5.3@aar') {
transitive = true
}
compile 'com.melnykov:floatingactionbutton:1.1.0'
compile 'com.github.brnunes:swipeablerecyclerview:1.0.1'
compile 'io.reactivex:rxjava:1.0.7'
compile 'io.reactivex:rxandroid:0.24.0'
compile 'com.squareup:otto:1.3.5'
compile 'com.google.dagger:dagger:2.8'
provided 'com.google.dagger:dagger-compiler:2.8'
}
if (project.hasProperty('keyAlias')) {
android.signingConfigs.release.keyAlias = keyAlias
}
if (project.hasProperty('keyPassword')) {
android.signingConfigs.release.keyPassword = keyPassword
}
if (project.hasProperty('storeFile')) {
android.signingConfigs.release.storeFile = file(storeFile)
}
if (project.hasProperty('storePassword')) {
android.signingConfigs.release.storePassword = storePassword
}