-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
47 lines (35 loc) · 1.15 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
buildscript {
apply from: "$rootDir/gradle/buildscript.gradle", to: buildscript
}
/*
plugins {
id 'com.gradle.build-scan' version '1.16'
}
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
*/
import org.ajoberstar.grgit.Grgit
import java.text.SimpleDateFormat
apply plugin: 'idea'
idea.project.vcs = 'Git'
subprojects {
buildscript { repositories { jcenter() } }
apply plugin: 'idea'
def gitHead = Grgit.open(dir: rootDir).head()
ext.gitId = "$gitHead.id"[0..6].toString()
ext.gitIdFull = gitHead.id.toString()
ext.gitCommitter = "$gitHead.committer.name <$gitHead.committer.email>".toString()
ext.gitShortMessage = "$gitHead.shortMessage".toString()
ext.gitTime = new Date(gitHead.time * 1000L).format('yyyy-MM-dd HH:mm:ss')
ext.gitTimeIso = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZZ").format(new Date(gitHead.time * 1000L))
ext.codekvastDisplayVersion = "${codekvastVersion}-${gitId}".toString()
repositories {
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
tasks.withType(JavaCompile) {
options.incremental = true
}
}