-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
86 lines (70 loc) · 2.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
plugins {
id 'com.dmdirc.git-version' version '1.0'
id 'com.github.kt3k.coveralls' version '2.6.3'
}
group = 'com.dmdirc'
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'jacoco'
apply plugin: 'idea'
idea {
module {
sourceDirs += file('src/main/generated')
testSourceDirs += file('src/test/generated_tests')
generatedSourceDirs = [file('src/main/generated'), file('src/test/generated_tests')]
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories.mavenCentral()
dependencies {
compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
compile group: 'com.google.auto.value', name: 'auto-value', version: '1.6'
compile group: 'com.google.auto.value', name: 'auto-value-annotations', version: '1.6'
compile group: 'com.google.guava', name:'guava', version: '19.0'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.2.7'
testCompile group: 'com.google.jimfs', name: 'jimfs', version: '1.1'
}
// DMDirc uses 19.0, JimFS has a transient dep on 16.0.1 - force the newer version
configurations.all {
resolutionStrategy.force('com.google.guava:guava:19.0')
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar { classifier 'sources' }
artifact javadocJar { classifier 'javadoc' }
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/dmdirc/util")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("PASSWORD")
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '3.1'
}
task publishSnapshot(dependsOn: 'publishMavenJavaPublicationToSnapshotsRepository') << {
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}