Skip to content

Commit

Permalink
Merge b5c7108 into 39720db
Browse files Browse the repository at this point in the history
  • Loading branch information
ysb33r committed Feb 11, 2019
2 parents 39720db + b5c7108 commit 9212bb7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 1.5.9.3-SNAPSHOT
version = 1.5.10
group = org.asciidoctor
sourceCompatibility = 1.7
targetCompatibility = 1.7
Expand All @@ -14,9 +14,9 @@ bintray_org = asciidoctor
bintray_repo = maven
bintray_dryRun = false

asciidoctorjVersion = 1.5.7
asciidoctorjVersion = 1.6.1
asciidoctorjDslVersion = 1.0.0.Alpha3
cglibVersion = 3.2.8
jsoupVersion = 1.11.3
spockVersion = 1.1-groovy-2.4
grolifantVersion = 0.9
grolifantVersion = 0.10
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class AsciidoctorFunctionalSpec extends Specification {
then:
result.task(":asciidoctor").outcome == TaskOutcome.SUCCESS
new File(buildDir, "asciidoc/html5/sample.html").exists()
output.contains('It seems that you may be using implicit attributes ')
output.contains('It seems that you may be using one or more implicit attributes')
output.contains('sample.asciidoc')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import org.gradle.api.Project
* @author Andres Almiray
*/
class AsciidoctorExtension {
String version = '1.5.8.1'
String version = '1.6.0'

String groovyDslVersion = '1.0.0.Alpha3'

Expand Down
14 changes: 12 additions & 2 deletions src/main/groovy/org/asciidoctor/gradle/AsciidoctorTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,15 @@ class AsciidoctorTask extends DefaultTask {
File output = outputDir

scanForLegacyAttributes()
Map finalAttributes = [
'gradle-project-group': project.group,
'gradle-project-name' : project.name,
'revnumber' : project.version,
'project-version' : project.version,
'project-group' : project.group,
'project-name' : project.name
]
finalAttributes.putAll(attributes)

ExecutorConfigurationContainer ecc = new ExecutorConfigurationContainer(activeBackends().collect { backend ->
new ExecutorConfiguration(
Expand All @@ -608,7 +617,7 @@ class AsciidoctorTask extends DefaultTask {
safeModeLevel: resolveSafeModeLevel(options['safe'], 0),
requires: (Set) (getRequires() ?: []),
options: options,
attributes: attributes,
attributes: finalAttributes,
asciidoctorExtensions: dehydrateExtensions(getAsciidoctorExtensions())
)
})
Expand Down Expand Up @@ -754,11 +763,12 @@ class AsciidoctorTask extends DefaultTask {

Set<File> hits = ft.files.findAll { File f ->
String content = f.text
content.find( ~/\{(projectdir|rootdir|project-version|project-name|project-group)\}/ )
content.contains('{projectdir}') || content.contains('{rootdir}')
}

if(!hits.empty) {
logger.warn 'It seems that you may be using implicit attributes `projectdir` and/or `rootdir` in your documents. These are deprecated and will no longer be set in 2.0. Please migrate your documents to use `gradle-projectdir` and `gradle-rootdir` instead.'
logger.warn 'It seems that you may be using one or more implicit attributes: `projectdir`, `rootdir`, `project-version`, `project-group`, `project.name` in your documents. These are deprecated and will no longer be set in 2.0. Please migrate your documents to use `gradle-projectdir`, `gradle-rootdir`, ``revnumber`, `gradle-project-version`, `gradle-project-name` respectively.'

if(dumpLegacyFileList) {
File base = sourceDir
Expand Down

0 comments on commit 9212bb7

Please sign in to comment.