allow kdoc to link to the online source code in a source code repo (such as github)
This commit is contained in:
+18
@@ -118,6 +118,20 @@ public class KDocMojo extends KotlinCompileMojoBase {
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* The HTTP link to source code
|
||||
*
|
||||
* @parameter expression="${sourceRootHref}"
|
||||
*/
|
||||
private String sourceRootHref;
|
||||
|
||||
/**
|
||||
* The root project directory used to deduce relative file names when linking to source code
|
||||
*
|
||||
* @parameter expression="${projectRootDir}" default-value="${project.basedir}"
|
||||
*/
|
||||
private String projectRootDir;
|
||||
|
||||
/**
|
||||
* Whether warnings should be generated if no comments could be found for classes, functions and properties being documented
|
||||
*
|
||||
@@ -150,10 +164,14 @@ public class KDocMojo extends KotlinCompileMojoBase {
|
||||
docConfig.setTitle(title);
|
||||
docConfig.setVersion(version);
|
||||
docConfig.setWarnNoComments(warnNoComments);
|
||||
docConfig.setSourceRootHref(sourceRootHref);
|
||||
docConfig.setProjectRootDir(projectRootDir);
|
||||
getLog().info("API docs output to: " + docConfig.getDocOutputDir());
|
||||
getLog().info("classpath: " + classpath);
|
||||
getLog().info("title: " + title);
|
||||
getLog().info("sources: " + sources);
|
||||
getLog().info("sourceRootHref: " + sourceRootHref);
|
||||
getLog().info("projectRootDir: " + projectRootDir);
|
||||
getLog().info("API docs ignore packages: " + ignorePackages);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user