-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
118 lines (104 loc) · 3.45 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
plugins {
id 'java-library'
id 'org.ajoberstar.grgit' version '5.2.2'
id 'org.gradlex.extra-java-module-info' version '1.9'
}
group = 'io.sf.carte'
description = 'css4j-dist'
version = '4.0-SNAPSHOT'
dependencies {
implementation 'io.sf.jclf:jclf-text:5.0.1'
implementation 'io.sf.jclf:jclf-linear3:1.0.0'
implementation 'org.dom4j:dom4j:2.1.4'
implementation 'org.slf4j:slf4j-api:2.0.16'
implementation 'nu.validator:htmlparser:1.4.16'
implementation 'xmlpull:xmlpull:1.2.0'
implementation 'xpp3:xpp3_min:1.2.0'
}
extraJavaModuleInfo {
automaticModule('htmlparser-1.4.16.jar', 'htmlparser')
}
repositories {
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
maven {
url "https://css4j.github.io/maven/"
mavenContent {
releasesOnly()
}
content {
includeGroup 'io.sf.carte'
includeGroup 'io.sf.jclf'
includeGroup 'xmlpull'
includeGroup 'xpp3'
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_11
}
// Clone all the repositories
tasks.register('cloneRepos') {
dependsOn rmRepos
doFirst {
mkdir "$buildDir/repos"
def gitTP = grgit.clone(dir: "$buildDir/repos/io.sf.carte.tokenproducer",
uri: 'https://github.com/css4j/tokenproducer.git')
def gitXmlDtd = grgit.clone(dir: "$buildDir/repos/io.sf.carte.xml.dtd",
uri: 'https://github.com/css4j/xml-dtd.git')
def gitCarteUtil = grgit.clone(dir: "$buildDir/repos/io.sf.carte.util",
uri: 'https://github.com/css4j/carte-util.git')
def gitCss4j = grgit.clone(dir: "$buildDir/repos/io.sf.carte.css4j",
uri: 'https://github.com/css4j/css4j.git')
def gitCss4jAgent = grgit.clone(dir: "$buildDir/repos/io.sf.carte.css4j.agent.net",
uri: 'https://github.com/css4j/css4j-agent.git')
def gitCss4jAwt = grgit.clone(dir: "$buildDir/repos/io.sf.carte.css4j.awt",
uri: 'https://github.com/css4j/css4j-awt.git')
def gitCss4jDom4j = grgit.clone(dir: "$buildDir/repos/io.sf.carte.css4j.dom4j",
uri: 'https://github.com/css4j/css4j-dom4j.git')
gitTP?.close()
gitXmlDtd?.close()
gitCarteUtil?.close()
gitCss4j?.close()
gitCss4jAgent?.close()
gitCss4jAwt?.close()
gitCss4jDom4j?.close()
}
}
tasks.register('rmRepos', Delete) {
doFirst {
delete "$buildDir/repos"
}
}
tasks.named('clean') {
dependsOn rmRepos
}
// Produce a Javadoc of all modules
tasks.register('mergedJavadoc', Javadoc) {
description 'Produces a merged Javadoc of all modules'
destinationDir = file("$buildDir/docs/javadoc")
title = "CSS4J ecosystem API"
dependsOn cloneRepos
dependsOn configurations.compileClasspath
source = [ "$buildDir/repos/io.sf.carte.tokenproducer/src/main/java",
"$buildDir/repos/io.sf.carte.xml.dtd/src",
"$buildDir/repos/io.sf.carte.util/src",
"$buildDir/repos/io.sf.carte.css4j/src/main/java",
"$buildDir/repos/io.sf.carte.css4j.agent.net/src",
"$buildDir/repos/io.sf.carte.css4j.awt/src",
"$buildDir/repos/io.sf.carte.css4j.dom4j/src" ]
includes += '**/*.java'
classpath = configurations.compileClasspath
options.addBooleanOption('html5', true)
options.overview "$buildDir/repos/io.sf.carte.css4j/src/main/resources/overview.html"
options.addStringOption('-module-source-path', "$buildDir/repos/*/{src,src/main/java}")
exclude 'io/sf/carte/doc/style/css/impl'
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charset', 'UTF-8')
options.links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
options.links 'https://dom4j.github.io/javadoc/2.1.4/'
}