-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
78 lines (65 loc) · 2.05 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
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
plugins {
id "signing"
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
}
group = 'org.asciidoctor'
description = 'A Groovy DSL for writing extensions for AsciidoctorJ'
ext {
buildDateTime = new Date()
(buildDateOnly, buildTimeOnly) = new java.text.SimpleDateFormat('yyyy-MM-dd HH:mm:ss.SSSZ').format(buildDateTime).split(' ')
projectArtifactId = 'asciidoctorj-groovy-dsl'
publicationName = 'asciidoctorjGroovyDsl'
groovyVer = '3.0.22'
}
apply plugin: 'groovy'
apply plugin: 'codenarc'
apply from: 'gradle/publish.gradle'
apply from: 'gradle/signing.gradle'
repositories {
mavenCentral()
}
dependencies {
implementation "org.codehaus.groovy:groovy:${groovyVer}"
implementation 'org.asciidoctor:asciidoctorj:3.0.0'
testImplementation platform("org.spockframework:spock-bom:2.3-groovy-3.0")
testImplementation "org.spockframework:spock-core"
testImplementation "org.spockframework:spock-junit4" // you can remove this if your code does not rely on old JUnit 4 rules
testImplementation 'junit:junit:4.13.2'
testImplementation 'cglib:cglib-nodep:3.3.0'
testImplementation 'org.jsoup:jsoup:1.16.1'
}
codenarc {
configFile = file('config/codenarc/codenarc.groovy')
// run codenarc on production sources only
sourceSets = [project.sourceSets.main]
}
java {
withJavadocJar()
withSourcesJar()
}
compileJava {
options.release = 11
}
nexusPublishing {
repositories {
sonatype {
if (project.hasProperty("sonatypeUsername")) {
username = project.sonatypeUsername
}
if (project.hasProperty("sonatypePassword")) {
password = project.sonatypePassword
}
repositoryDescription = "Release ${project.group} ${project.version}"
}
}
clientTimeout = Duration.ofMinutes(5)
}