-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.gradle
56 lines (46 loc) · 1.02 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
buildscript {
repositories {
google()
mavenCentral()
//noinspection JcenterRepositoryObsolete
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
}
}
plugins {
id "com.github.sherter.google-java-format" version "0.8"
}
allprojects {
repositories {
google()
mavenCentral()
//noinspection JcenterRepositoryObsolete
jcenter()
}
}
subprojects { project ->
project.tasks.withType(JavaCompile) {
dependsOn(installGitHooks)
}
repositories {
google()
mavenCentral()
//noinspection JcenterRepositoryObsolete
jcenter() }
}
googleJavaFormat {
toolVersion = "1.7"
}
////////////////////////////////////////////////////////////////////////
//
// Google Java Format pre-commit hook installation
////////////////////////////////////////////////////////////////////////
tasks.register('installGitHooks', Copy) {
from(file('config/hooks/pre-commit-stub')) {
rename 'pre-commit-stub', 'pre-commit'
}
into file('.git/hooks')
fileMode 0777
}