-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
48 lines (39 loc) · 1.1 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
group 'biz.cosee.null4j'
version '1.0.0'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
jcenter()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile 'org.assertj:assertj-core:3.8.0'
compile 'com.google.code.findbugs:jsr305:1.3.9'
compile files('lib/annotations-java8.jar')
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
apply plugin: 'maven-publish'
publishing {
publications {
maven(MavenPublication) {
from components.java
pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'compile'
}
}
}
}
}
model {
tasks.generatePomFileForMavenPublication {
destination = file("$buildDir/libs/null4j-1.0.0.pom")
}
}