-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
104 lines (82 loc) · 2.65 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
plugins {
id "com.github.hierynomus.license" version "0.16.1"
}
allprojects {
apply plugin: 'license'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
group = 'com.anjlab.tapestry5'
license {
header rootProject.file('LICENSE')
skipExistingHeaders true
strictCheck true
exclude '*.tml'
}
}
project.ext.tapestry_version = '5.8.7'
configurations {
all*.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
all*.exclude group: 'org.slf4j', module: 'slf4j-simple'
all*.exclude group: 'log4j', module: 'log4j'
all*.exclude group: 'commons-logging', module: 'commons-logging'
}
subprojects {
apply plugin: 'java'
sourceCompatibility = 11
targetCompatibility = 11
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
def slf4j_version = '1.7.5'
def logback_version = '1.0.13'
api "org.slf4j:slf4j-api:${slf4j_version}"
implementation "org.slf4j:jcl-over-slf4j:${slf4j_version}"
implementation "org.slf4j:log4j-over-slf4j:${slf4j_version}"
compileOnly "ch.qos.logback:logback-core:${logback_version}"
compileOnly "ch.qos.logback:logback-classic:${logback_version}"
testImplementation 'junit:junit:4.8.2'
}
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
archiveClassifier.set('sources')
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
archiveClassifier.set('javadoc')
}
jar.dependsOn sourcesJar
jar.dependsOn javadocJar
artifacts {
archives sourcesJar
archives javadocJar
}
def pomFragments = {
developers {
developer {
id "dmitrygusev"
name "Dmitry Gusev"
email "[email protected]"
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
def root = asNode()
root.appendNode('description', project.description)
def license = root.appendNode('licenses').appendNode('license')
license.appendNode("name", "The Apache Software License, Version 2.0")
license.appendNode("url", "http://www.apache.org/licenses/LICENSE-2.0.txt")
license.appendNode("distribution", "repo")
root.children().last() + pomFragments
}
}
}
}
}