-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
59 lines (47 loc) · 1.49 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
version = "1.0.2"
description = "Root project for ${rootProject.name}."
group "com.ueas.tai"
allprojects {
apply plugin:'java'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
group = rootProject.group
version = rootProject.version
repositories {
mavenCentral()
}
// fail eagerly on version conflict (includes transitive dependencies) and enforce certain dependency versions
configurations.all {
resolutionStrategy {
cacheDynamicVersionsFor 0, 'seconds'
cacheChangingModulesFor 0, 'seconds'
}
}
}
subprojects{
apply plugin: 'maven-publish'
dependencies {
compile 'org.apache.logging.log4j:log4j-core:2.11.2'
compile 'org.apache.logging.log4j:log4j-api:2.11.2'
compile 'commons-io:commons-io:2.5'
compile 'commons-lang:commons-lang:2.5'
// test
testCompile 'junit:junit:4.11'
}
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
}
publishing {
publications {
"$project.name"(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
artifact project.sourcesJar { // not required, includes sourcesJar with correct classifer
classifier "sources"
}
}
}
}
}