-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
65 lines (53 loc) · 1.38 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
63
64
65
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "net.ltgt.gradle:gradle-apt-plugin:0.12"
}
}
plugins {
id 'com.zyxist.chainsaw' version '0.1.3'
}
subprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'com.zyxist.chainsaw'
apply plugin: 'net.ltgt.apt'
group = 'com.zyxist.example.dagger'
version = '1.0-SNAPSHOT'
sourceCompatibility = '1.9'
targetCompatibility = '1.9'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
javaModule.patchModules 'com.google.code.findbugs:jsr305': 'javax.annotation:jsr250-api'
compileJava {
options.compilerArgs << "-Xlint:unchecked"
}
sourceSets {
main {
java {
srcDirs = ['src/main/java', 'build/generated/source/apt/main']
}
}
}
// workaround for Java compiler bug that crashes JVM during the compilation,
// if the directory with generated sources already exists:
task cleanGeneratedSources (type: Delete) {
delete 'build/generated/source/apt/main'
}
compileJava.dependsOn cleanGeneratedSources
repositories {
mavenCentral()
}
dependencies {
patch 'com.google.code.findbugs:jsr305:1.3.9'
compile 'com.google.dagger:dagger:2.11'
compile 'com.google.guava:guava:23.0'
compile 'javax.annotation:jsr250-api:1.0'
apt 'com.google.dagger:dagger-compiler:2.11'
apt 'javax.annotation:jsr250-api:1.0'
}
}