-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure Dokka for the new separated repo
- Loading branch information
Showing
7 changed files
with
93 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
val githubRepo = "SilkMC/silk-compose" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import org.jetbrains.dokka.gradle.DokkaTaskPartial | ||
import java.net.URL | ||
|
||
plugins { | ||
id("org.jetbrains.dokka") | ||
} | ||
|
||
tasks { | ||
val processDokkaMarkdown = register<Copy>("processDokkaMarkdown") { | ||
from(layout.projectDirectory.dir("docs")) | ||
into(layout.buildDirectory.dir("docs-markdown")) | ||
|
||
val properties = linkedMapOf( | ||
"dependencyNotice" to """ | ||
### Dependency | ||
```kt | ||
modImplementation("net.silkmc:${project.name}:${rootProject.version}") | ||
``` | ||
""".trimIndent() | ||
) | ||
|
||
inputs.properties(properties) | ||
expand(properties) | ||
} | ||
|
||
withType<DokkaTaskPartial> { | ||
dependsOn(processDokkaMarkdown) | ||
|
||
dokkaSourceSets { | ||
configureEach { | ||
includes.from( | ||
buildDir.resolve("docs-markdown").listFiles()!! | ||
.sortedBy { if (it.name == "Module.md") "0" else it.name } | ||
.map { "build/docs-markdown/${it.name}" } | ||
.toTypedArray() | ||
) | ||
|
||
sourceLink { | ||
localDirectory.set(file("src/main/kotlin")) | ||
remoteUrl.set(URL("https://github.com/$githubRepo/tree/main/src/main/kotlin")) | ||
remoteLineSuffix.set("#L") | ||
} | ||
|
||
listOf("internal", "mixin").forEach { | ||
perPackageOption { | ||
matchingRegex.set(""".*\.$it.*""") | ||
suppress.set(true) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
## silk-compose | ||
|
||
Silk Compose is a module for [SilkMC](https://github.com/SilkMC/silk) which makes it possible to use Compose | ||
Multiplatform inside Minecraft, both on the server- and the client-side (the latter only planned). | ||
|
||
### Demo | ||
|
||
<video controls width="550"> | ||
<source src="https://user-images.githubusercontent.com/52456572/175792435-1a7f0e30-76cc-4739-87dc-0ec8ed222d4a.mp4" | ||
type="video/mp4"> | ||
Sorry, your browser doesn't support embedded videos. | ||
</video> | ||
|
||
### Download | ||
|
||
Download silk-compose [from **Modrinth**](https://modrinth.com/mod/silk-compose) to provide it at runtime and add it as | ||
a mod. | ||
|
||
### API docs | ||
|
||
Have a look at [the docs for the main silk-compose module][silk-compose]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters