File tree Expand file tree Collapse file tree 7 files changed +93
-3
lines changed Expand file tree Collapse file tree 7 files changed +93
-3
lines changed Original file line number Diff line number Diff line change
1
+ import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
1
2
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2
3
3
4
plugins {
4
5
id(" com.google.devtools.ksp" ) version " 1.7.0-1.0.6" apply false
5
6
id(" org.jetbrains.compose" ) version " 1.2.0-alpha01-dev725" apply false
7
+ id(" org.jetbrains.dokka" )
6
8
}
7
9
8
10
allprojects {
@@ -39,3 +41,9 @@ allprojects {
39
41
}
40
42
41
43
extra[" kotlin.code.style" ] = " official"
44
+
45
+ tasks {
46
+ withType<DokkaMultiModuleTask > {
47
+ includes.from(" dokka/includes/main.md" )
48
+ }
49
+ }
Original file line number Diff line number Diff line change
1
+ val githubRepo = " SilkMC/silk-compose"
Original file line number Diff line number Diff line change
1
+ import org.jetbrains.dokka.gradle.DokkaTaskPartial
2
+ import java.net.URL
3
+
4
+ plugins {
5
+ id(" org.jetbrains.dokka" )
6
+ }
7
+
8
+ tasks {
9
+ val processDokkaMarkdown = register<Copy >(" processDokkaMarkdown" ) {
10
+ from(layout.projectDirectory.dir(" docs" ))
11
+ into(layout.buildDirectory.dir(" docs-markdown" ))
12
+
13
+ val properties = linkedMapOf(
14
+ " dependencyNotice" to """
15
+ ### Dependency
16
+ ```kt
17
+ modImplementation("net.silkmc:${project.name} :${rootProject.version} ")
18
+ ```
19
+ """ .trimIndent()
20
+ )
21
+
22
+ inputs.properties(properties)
23
+ expand(properties)
24
+ }
25
+
26
+ withType<DokkaTaskPartial > {
27
+ dependsOn(processDokkaMarkdown)
28
+
29
+ dokkaSourceSets {
30
+ configureEach {
31
+ includes.from(
32
+ buildDir.resolve(" docs-markdown" ).listFiles()!!
33
+ .sortedBy { if (it.name == " Module.md" ) " 0" else it.name }
34
+ .map { " build/docs-markdown/${it.name} " }
35
+ .toTypedArray()
36
+ )
37
+
38
+ sourceLink {
39
+ localDirectory.set(file(" src/main/kotlin" ))
40
+ remoteUrl.set(URL (" https://github.com/$githubRepo /tree/main/src/main/kotlin" ))
41
+ remoteLineSuffix.set(" #L" )
42
+ }
43
+
44
+ listOf (" internal" , " mixin" ).forEach {
45
+ perPackageOption {
46
+ matchingRegex.set(""" .*\.$it .*""" )
47
+ suppress.set(true )
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
Original file line number Diff line number Diff line change 1
1
plugins {
2
2
`maven- publish`
3
3
signing
4
+ kotlin(" jvm" )
4
5
}
5
6
6
- val githubRepo = " SilkMC/silk-compose"
7
+ java {
8
+ withSourcesJar()
9
+ withJavadocJar()
10
+ }
7
11
8
12
publishing {
9
13
repositories {
Original file line number Diff line number Diff line change
1
+ ## silk-compose
2
+
3
+ Silk Compose is a module for [ SilkMC] ( https://github.com/SilkMC/silk ) which makes it possible to use Compose
4
+ Multiplatform inside Minecraft, both on the server- and the client-side (the latter only planned).
5
+
6
+ ### Demo
7
+
8
+ <video controls width =" 550 " >
9
+ <source src="https://user-images.githubusercontent.com/52456572/175792435-1a7f0e30-76cc-4739-87dc-0ec8ed222d4a.mp4"
10
+ type="video/mp4">
11
+ Sorry, your browser doesn't support embedded videos.
12
+ </video >
13
+
14
+ ### Download
15
+
16
+ Download silk-compose [ from ** Modrinth** ] ( https://modrinth.com/mod/silk-compose ) to provide it at runtime and add it as
17
+ a mod.
18
+
19
+ ### API docs
20
+
21
+ Have a look at [ the docs for the main silk-compose module] [ silk-compose ] .
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ plugins {
4
4
`mod- build- script`
5
5
`project- publish- script`
6
6
`mod- upload- script`
7
+ `dokka- script`
7
8
id(" com.google.devtools.ksp" )
8
9
id(" org.jetbrains.compose" )
9
10
}
Original file line number Diff line number Diff line change 1
- # Module fabrikmc -compose
1
+ # Module silk -compose
2
2
3
3
Adds server-side Compose support to the game. This allows you to create any gui you want, without any limitations -
4
4
using a modern UI toolkit.
@@ -35,7 +35,9 @@ You can now have a look at the **UI** package (below) to see custom composable f
35
35
36
36
There are docs at [ Android Developer Website] ( https://developer.android.com/jetpack/compose/documentation ) and you can
37
37
find desktop specific documentation at the [ compose-jb] ( https://github.com/JetBrains/compose-jb ) repository.
38
- Additionally, there is a [ communtiy maintained playground] ( https://foso.github.io/Jetpack-Compose-Playground/ ) .
38
+ Additionally, there is a [ community maintained playground] ( https://foso.github.io/Jetpack-Compose-Playground/ ) .
39
+ For each Compose module, you can also find very useful API docs, e.g.
40
+ [ the ones for Material 3] ( https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary ) .
39
41
40
42
# Package net.silkmc.silk.compose
41
43
You can’t perform that action at this time.
0 commit comments