-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
137 lines (120 loc) · 4.28 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
group 'com.azimo.tool'
version '2.6'
def jarBasename = 'review-reporter'
def jarClassifier = 'assembly'
def jarArchiveName = jarBasename + "-" + version + "-" + jarClassifier + ".jar"
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: "net.ltgt.apt"
apply plugin: 'idea'
apply plugin: "jacoco"
apply plugin: 'java'
apply plugin: 'maven-publish'
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
jcenter()
mavenCentral()
}
dependencies {
classpath "net.ltgt.gradle:gradle-apt-plugin:0.9"
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
}
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
apt 'com.google.dagger:dagger-compiler:2.7'
compile 'javax.inject:javax.inject:1'
compile 'com.google.apis:google-api-services-androidpublisher:v2-rev38-1.22.0'
compile 'com.squareup.retrofit2:retrofit:2.0.1'
compile 'com.squareup.retrofit2:converter-gson:2.0.1'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.1'
compile 'com.squareup.retrofit2:converter-scalars:2.0.1'
compile 'io.reactivex:rxjava:1.1.5'
compile 'com.squareup.okhttp3:okhttp:3.5.0'
compile 'com.squareup.okhttp3:okhttp-urlconnection:3.5.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.5.0'
testCompile 'junit:junit:4.11'
testCompile 'org.mockito:mockito-core:1.+'
testCompile 'org.hamcrest:hamcrest-core:1.3'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'org.hamcrest:hamcrest-integration:1.3'
}
compileJava {
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
}
jar {
baseName = jarBasename
archiveName = "review-reporter-" + version + ".jar"
manifest {
attributes 'Main-Class': 'com.azimo.tool.ReviewReporterService',
'Implementation-Title': 'Azimo',
'Implementation-Version': version
}
}
jacocoTestReport {
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ['**/*Dagger*Component*.*',
'**/*_MembersInjector*.*',
'**/*_Factory*.*',
'**/*Provide*Factory*.*',
'**/*Module.*',
'**/*Module_*Factory.*',
'**/dagger/**',
'**/config/AppConfigKey.class',
'**/firebase/model/**',
'**/firebase/response/**',
'**/firebase/FirebaseIssueService.class',
'**/jira/JiraIssueService.class',
'**/jira/model/**',
'**/jira/response/**',
'**/publisher/model/**',
'**/publisher/AndroidPublisherBuilder.class',
'**/slack/model/**',
'**/slack/module/**',
'**/slack/response/**',
'**/slack/SlackService.class',
'**/task/base/**',
'**/task/interfaces/**',
'**/task/module/**'])
})
}
}
shadowJar {
baseName = jarBasename
classifier = jarClassifier
archiveName = jarArchiveName
manifest {
attributes 'Implementation-Title': 'Gradle Quickstart', 'Implementation-Version': version
attributes 'Main-Class': 'com.azimo.tool.ReviewReporterService'
}
}
publishing {
repositories {
maven {
def mavenUserName = System.getenv('NEXUS_USER')
def mavenPassword = System.getenv('NEXUS_PASSWORD')
def mavenUrl = System.getenv('NEXUS_URL')
if (mavenUserName != null && mavenPassword != null && mavenUrl != null) {
credentials {
username mavenUserName
password mavenPassword
}
url mavenUrl
}
}
}
publications {
mavenJava(MavenPublication) {
artifactId jarBasename
artifact shadowJar
}
}
}