Skip to content

Commit

Permalink
Address minor review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnatBeresnev committed Oct 18, 2023
1 parent 0188f5f commit 27fba64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ object TestProjectAnalyzer {
private fun TestProject.initialize(outputDirectory: File): Pair<DokkaConfiguration, DokkaContext> {
analysisLogger.progress("Initializing and verifying project $this")
this.verify()
require(outputDirectory.exists() && outputDirectory.isDirectory) {
require(outputDirectory.isDirectory) {
"outputDirectory has to exist and be a directory: $outputDirectory"
}
this.initializeTestFiles(relativeToDir = outputDirectory)
Expand Down Expand Up @@ -128,9 +128,9 @@ object TestProjectAnalyzer {
throw IllegalStateException("Unable to create dirs \"${testDataFile.parentFile}\"", e)
}

analysisLogger.debug("Creating \"${testDataFile.absoluteFile}\"")
analysisLogger.debug("Creating \"${testDataFile.absolutePath}\"")
check(testDataFile.createNewFile()) {
"Unable to create a test file: ${testDataFile.absoluteFile}"
"Unable to create a test file: ${testDataFile.absolutePath}"
}
testDataFile.writeText(it.getContents(), Charsets.UTF_8)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ abstract class BaseTestDokkaSourceSetBuilder {
verifyFilePathStartsWithSlash("additionalSourceRoots", it)
}
additionalClasspath.forEach {
verifyFileExtension("additionalClasspath", it, ".jar") // should it include .klib?
// this check can be extended to accept .klib, .class or other files
// as the need for it arises, as long as Dokka supports it
verifyFileExtension("additionalClasspath", it, ".jar")
}
includes.forEach {
verifyFilePathStartsWithSlash("includes", it)
Expand Down

0 comments on commit 27fba64

Please sign in to comment.