Skip to content

Commit

Permalink
fix: resolved bug regarding documentation home page generation
Browse files Browse the repository at this point in the history
  • Loading branch information
brizzbuzz committed Jan 8, 2022
1 parent 6620bc4 commit 65909a7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.3] - January 8th, 2022
### Changed
- Fixed bug where documentation home page was being generated on plugin load

## [0.3.2] - January 8th, 2022
### Added
- Optional root `Project.md` file to include in documentation
Expand Down
20 changes: 11 additions & 9 deletions core/src/main/kotlin/io/bkbn/sourdough/gradle/core/RootPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,18 @@ class RootPlugin : Plugin<Project> {
finalizedBy("generateDokkaHomePage")
}
tasks.register("generateDokkaHomePage") {
val version = version.toString()
val dokkaDir = rootDir.resolve(rootFolder)
if (!dokkaDir.exists()) {
dokkaDir.mkdir()
}
val index = rootDir.resolve("$rootFolder/index.html")
if (!index.exists()) {
index.createNewFile()
doLast {
val version = version.toString()
val dokkaDir = rootDir.resolve(rootFolder)
if (!dokkaDir.exists()) {
dokkaDir.mkdir()
}
val index = rootDir.resolve("$rootFolder/index.html")
if (!index.exists()) {
index.createNewFile()
}
index.writeText("<meta http-equiv=\"refresh\" content=\"0; url=./$version\" />\n")
}
index.writeText("<meta http-equiv=\"refresh\" content=\"0; url=./$version\" />\n")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Project
project.version=0.3.2
project.version=0.3.3

# Kotlin
kotlin.code.style=official
Expand Down

0 comments on commit 65909a7

Please sign in to comment.