Version number unspecified when using default task
Closed this issue · 2 comments
FriedrichFroebel commented
When using the the default doxygen
task, the version number is missing from the output.
The relevant parts of my build.gradle
file:
version = '1.0'
doxygen {
template 'Doxyfile'
source = sourceSets.main.allJava
}
import org.ysb33r.gradle.doxygen.Doxygen
task doxygen2(type: Doxygen) {
template 'Doxyfile'
source = sourceSets.main.allJava
outputDir = "${buildDir}/docs/doxygen2/"
}
Running the normal doxygen
task, I have a string saying unspecified
inside my HTML files, whereas the second one displays the right version number.
ysb33r commented
Found the bug. It is trying to evaluate project.version
when the plugin is applied. It's too early as the version might not have been set yet.
Just need to think about which way is best to fix. In the mean time the workaround is to do either
doxygen {
project_version = version
}
or
plugins {
id 'org.ysb33r.doxygen' version '0.3.1' apply false
}
version = '1.0'
apply plugin : 'org.ysb33r.doxygen'
P.S. It is definitively showing up that this is one of the first plugins I ever wrote. There is a number of things in the code that I would not do now.
ysb33r commented
Fixed. Released in v0.3.2.