Skip to content

Commit bf60c0b

Browse files
committed
Adjusting build.gradle and docs-config.gradle to make asciidoc build
1 parent 74e5d23 commit bf60c0b

File tree

2 files changed

+11
-31
lines changed

2 files changed

+11
-31
lines changed

build.gradle

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@ import java.time.Instant
22
import java.time.ZoneOffset
33
import java.time.format.DateTimeFormatter
44

5-
plugins {
6-
id "com.adarshr.test-logger" version "4.0.0"
7-
id "maven-publish"
8-
id 'org.asciidoctor.jvm.convert'
9-
id 'org.apache.grails.gradle.grails-plugin'
10-
id 'org.apache.grails.gradle.grails-publish'
11-
}
5+
apply plugin: 'groovy'
6+
apply plugin: 'org.apache.grails.gradle.grails-plugin'
7+
apply plugin: 'org.apache.grails.gradle.grails-publish'
128

139
group "org.grails.plugins"
1410

@@ -44,23 +40,7 @@ dependencies {
4440
java {
4541
withSourcesJar()
4642
withJavadocJar()
47-
sourceCompatibility = JavaVersion.toVersion("17")
48-
}
49-
50-
asciidoctor {
51-
baseDir file('src/main/asciidoc')
52-
sourceDir file('src/main/asciidoc')
53-
outputDir project.layout.buildDirectory.file("docs")
54-
options doctype: 'book'
55-
attributes 'source-highlighter': 'coderay',
56-
toc: 'left',
57-
toclevels: '2',
58-
'toc-title': 'Table of Contents',
59-
icons: 'font',
60-
id: project.name + ':' + project.version,
61-
idprefix: '',
62-
idseparator: '-',
63-
version: version
43+
sourceCompatibility = JavaVersion.toVersion(javaVersion)
6444
}
6545

6646
tasks.withType(Test).configureEach {
@@ -69,9 +49,6 @@ tasks.withType(Test).configureEach {
6949
events "failed"
7050
exceptionFormat "full"
7151
}
72-
testlogger {
73-
theme 'mocha'
74-
}
7552
}
7653
groovydoc {
7754
excludes = ['**/*GrailsPlugin.groovy', '**/Application.groovy']
@@ -83,7 +60,6 @@ groovydoc {
8360
link('http://gorm.grails.org/latest/hibernate/api/', 'grails.gorm', 'grails.orm', 'org.grails.datastore', 'org.grails.orm')
8461
}
8562

86-
8763
grailsPublish {
8864
githubSlug = 'grails-plugins/i18n-enums'
8965
license {
@@ -98,3 +74,7 @@ grailsPublish {
9874
bkoehm : 'Brian Koehmstedt'
9975
]
10076
}
77+
78+
compileJava.options.release = javaVersion.toInteger()
79+
80+
apply from: layout.projectDirectory.file('gradle/docs-config.gradle')

gradle/docs-config.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ tasks.withType(AsciidoctorTask).configureEach {
2929
doctype : 'book',
3030
encoding : 'utf-8',
3131
icons : 'font',
32-
id : "$rootProject.name:$projectVersion",
32+
id : "$rootProject.name:$version",
3333
idprefix : '',
3434
idseparator : '-',
3535
lang : 'en',
3636
linkattrs : true,
3737
numbered : '',
3838
producer : 'Asciidoctor',
39-
revnumber : projectVersion,
39+
revnumber : version,
4040
setanchors : true,
4141
'source-highlighter' : 'prettify',
4242
toc : 'left',
4343
toc2 : '',
4444
toclevels : '2',
45-
projectVersion : projectVersion
45+
projectVersion : version
4646
]
4747
}
4848

0 commit comments

Comments
 (0)