File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,20 @@ java.modularity.inferModulePath.set(true)
3737
3838tasks {
3939
40+ val netlifyBadge by registering {
41+ doLast {
42+ val index = dokkaHtml.get().outputDirectory.get().resolve(" kotlin-unsigned" + File .separatorChar + " index.html" )
43+ val text = index.readText()
44+ val ofs = text.lastIndexOf(" </span>" ) + 7
45+ val badge = """
46+ <a href="https://www.netlify.com">
47+ <img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" style="vertical-align:middle;margin:10px 10px" />
48+ </a>
49+ """ .trimIndent()
50+ index.writeText(text.replaceRange(ofs, ofs, badge))
51+ }
52+ }
53+
4054 dokkaHtml {
4155 dokkaSourceSets {
4256 configureEach {
@@ -50,6 +64,7 @@ tasks {
5064 }
5165 }
5266 }
67+ finalizedBy(netlifyBadge)
5368 }
5469
5570 withType<KotlinCompile >().all {
You can’t perform that action at this time.
0 commit comments