-
Notifications
You must be signed in to change notification settings - Fork 172
/
build.gradle
69 lines (59 loc) · 2.53 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
apply plugin: 'application'
if (project.statusIsRelease && project.hasProperty("sdkman_consumer_key")) {
apply from: rootProject.file('gradle/sdkman.gradle')
}
dependencies {
implementation(project(':asciidoctorj')) {
exclude group: 'org.jruby'
}
implementation(project(':asciidoctorj-api')) {
transitive = false
}
implementation("org.asciidoctor:asciidoctorj-epub3:$asciidoctorjEpub3Version") {
transitive = false
}
implementation("org.asciidoctor:asciidoctorj-diagram:$asciidoctorjDiagramVersion") {
transitive = false
}
implementation("org.asciidoctor:asciidoctorj-pdf:$asciidoctorjPdfVersion") {
transitive = false
}
implementation("org.asciidoctor:asciidoctorj-revealjs:$asciidoctorjRevealJsVersion") {
transitive = false
}
implementation "org.jruby:jruby-complete:$jrubyVersion"
testImplementation project(':asciidoctorj-arquillian-extension')
testImplementation "org.apache.pdfbox:pdfbox:$pdfboxVersion"
testImplementation "org.jsoup:jsoup:$jsoupVersion"
}
jar.enabled = false
configurations.archives.with {
//We need to remove the (non-existing) jar artifact, otherwise signing will fail
artifacts.removeAll{ it.type.equals("jar") }
}
tasks.withType(AbstractArchiveTask) {
baseName rootProject.name
classifier 'bin' // use classifier for identification in repository list
eachFile { it.path = it.path.replaceFirst('-bin(?=/)', '') }
//destinationDir = ...
}
startScripts {
unixStartScriptGenerator.template = resources.text.fromFile('src/main/resources/customUnixStartScript.txt')
applicationName = rootProject.name
mainClassName = 'org.asciidoctor.jruby.cli.AsciidoctorInvoker'
defaultJvmOpts = [
'-client', '-Xmn128m', '-Xms256m', '-Xmx256m', '-Djava.awt.headless=true',
'-Xverify:none', '-XX:+TieredCompilation', '-XX:TieredStopAtLevel=1', '-XX:+DisableExplicitGC', '-Djruby.compile.mode=OFF'
]
}
project.ext.publicationName = "mavenAsciidoctorJ"
// This module wants to add an artifact to the publication configured for the module asciidoctorj
// I am unaware right now how to enforce the configuration order, so it could theoretically happen that
// the publication is not available yet. In that case fail the build and find some other way to fix it...
def publication = rootProject.project('asciidoctorj').extensions.findByName('publishing').publications.findByName(project.ext.publicationName)
if (!publication) {
throw new ProjectConfigurationException("Publication ${project.ext.publicationName} not configured yet", [])
}
publication.each {
it.artifact distZip
}