-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
62 lines (53 loc) · 1.77 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
// maven { url uri("./repo") }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.jusenr.gradle.plugin:simple-build-gradle:1.1.3'
//maven
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
// maven { url "https://jitpack.io" }
flatDir {
dirs "$rootDir/componentrelease" //this way we can find the *.aar file in folder.
}
}
//Global settings for project code.
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
options.addStringOption('link', 'http://docs.oracle.com/javase/7/docs/api')
options.addStringOption('windowtitle', 'build-gradle')
options.addBooleanOption('author', true)
options.addBooleanOption('version', true)
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
//Get current time.
def releaseTime(def format) {
return new Date().format(format)
}
//git commit times.
static int gitVersionCode() {
def count = "git rev-list HEAD --count".execute().text.trim()
return count.isInteger() ? count.toInteger() : 0
}
ext {
APP_LOG_TAG = "build_gradle"//App print log tag.
}