-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
build.gradle
60 lines (51 loc) · 2.16 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
//--------------------------------------------------------------------------------------------------
// Scripts to install plugin to local repository [~/.m2/repository]
// > ./gradlew install
//--------------------------------------------------------------------------------------------------
apply plugin: 'groovy'
repositories {
jcenter()
}
dependencies {
compile gradleApi()
compile localGroovy()
}
apply from: 'provided.gradle'
apply plugin: 'maven'
//--------------------------------------------------------------------------------------------------
// Scripts to upload plugin to Bintray/JCenter [https://bintray.com/]
// > ./gradlew bintrayUpload
//--------------------------------------------------------------------------------------------------
task bintrayUpload(type: GradleBuild, dependsOn: 'clean') {
buildFile = 'bintray.gradle'
tasks = ['bintrayUpload']
}
//--------------------------------------------------------------------------------------------------
// Scripts to upload plugin to Gradle Plugins Portal [https://plugins.gradle.org/]
// > ./gradlew publish
//--------------------------------------------------------------------------------------------------
task publish(type: GradleBuild, dependsOn: 'clean') {
buildFile = 'publish.gradle'
tasks = ['build']
}
//--------------------------------------------------------------------------------------------------
// 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)
// def log = "git log --pretty=format:'%cd %cn %s' --date=short --since=$date --oneline ${project.projectDir}"
project.exec {
executable 'git'
args 'log', '--pretty=format:%cd #%h @%cn %s', '--date=short', "--since=$date", project.projectDir
}
// println log.execute().text
}