-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathbuild.gradle
More file actions
55 lines (48 loc) · 1.8 KB
/
build.gradle
File metadata and controls
55 lines (48 loc) · 1.8 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
}
}
apply from: 'base.gradle'
//--------------------------------------------------------------------------------------------------
// Scripts to install plugin to local repository [~/.m2/repository]
// > ./gradlew install
//--------------------------------------------------------------------------------------------------
task install(type: GradleBuild, dependsOn: 'clean') {
buildFile = 'install.gradle'
tasks = ['install']
}
//--------------------------------------------------------------------------------------------------
// Scripts to upload plugin to Bintray/JCenter [https://bintray.com/]
// > ./gradlew bintrayUpload
//--------------------------------------------------------------------------------------------------
task bintrayUpload(type: GradleBuild, dependsOn: 'clean') {
buildFile = 'publish.gradle'
tasks = ['bintrayUpload']
}
task doc(type: GradleBuild) {
buildFile = 'publish.gradle'
tasks = ['javadoc']
}
//--------------------------------------------------------------------------------------------------
// Helper scripts
//--------------------------------------------------------------------------------------------------
task ('changes') .doLast {
def changelog = project.file('CHANGELOG.md')
if (!changelog.exists()) return
def br = new BufferedReader(new FileReader(changelog))
def top = br.readLine()
br.close()
def loc = top.indexOf('(')
if (loc < 0) return
def date = top.substring(loc + 1)
loc = date.indexOf(')')
date = date.substring(0, loc)
project.exec {
executable 'git'
args 'log', '--pretty=format:%cd #%h @%cn %s', '--date=short', "--since=$date", project.projectDir
}
}