forked from yaxim-org/yaxim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
100 lines (88 loc) · 2.07 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'org.ajoberstar:grgit:1.1.0'
}
}
plugins {
// obtain revision from git
id 'org.ajoberstar.grgit' version '1.6.0'
}
allprojects {
repositories {
jcenter()
}
}
/////////////// yaxim specific build rules ///////////////
apply plugin: 'com.android.application'
ext {
build_date = "${new Date().format('yyyy-MM-dd')}"
build_revision = "${grgit.describe()}"
build_version = "yaxim ${build_revision} ${build_date}"
}
task buildVersion (type: Copy) {
from("template") {
include "version.xml"
expand( build_date: build_date,
build_revision: build_revision,
build_version: build_version)
}
into("res/values")
outputs.upToDateWhen {
false
}
}
android {
compileSdkVersion 22
buildToolsVersion "25.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 17
versionName "$build_revision"
}
signingConfigs {
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
buildTypes {
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
signingConfig signingConfigs.release
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
lintOptions {
disable 'MissingTranslation'
}
}
dependencies {
compile project('actionbarsherlock')
compile project('MemorizingTrustManager')
compile fileTree(include: ['*.jar'], dir: 'libs')
}
preBuild.dependsOn buildVersion