diff --git a/.idea/runConfigurations/Documentation.xml b/.idea/runConfigurations/Documentation.xml
index b763fa3..64da272 100644
--- a/.idea/runConfigurations/Documentation.xml
+++ b/.idea/runConfigurations/Documentation.xml
@@ -4,14 +4,13 @@
-
+
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 0000000..2c8e540
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1,4 @@
+gradlew
+gradlew.bat
+
+gradle
diff --git a/docs/.idea/.gitignore b/docs/.idea/.gitignore
new file mode 100644
index 0000000..8edf20f
--- /dev/null
+++ b/docs/.idea/.gitignore
@@ -0,0 +1,13 @@
+# Ignore everything by default
+# (ignore specific files instead of folders, because we can't unignore files in ignored folders)
+*.xml
+*.iml
+
+shelf/
+
+!.name
+!inspectionProfiles/*
+!runConfigurations/*
+!git_toolbox_prj.xml
+!codeStyles/*
+!copyright/*
diff --git a/docs/.idea/inspectionProfiles/Project_Default.xml b/docs/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..e13319d
--- /dev/null
+++ b/docs/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/docs/build.gradle.kts b/docs/build.gradle.kts
new file mode 100644
index 0000000..af2aa5a
--- /dev/null
+++ b/docs/build.gradle.kts
@@ -0,0 +1,9 @@
+
+plugins {
+ alias(opensavvyConventions.plugins.base)
+ alias(opensavvyConventions.plugins.root)
+
+ // Some plugins *must* be configured on the root project.
+ // In these cases, we explicitly tell Gradle not to apply them.
+ alias(opensavvyConventions.plugins.aligned.kotlin) apply false
+}
diff --git a/docs/example/example-app/build.gradle.kts b/docs/example/example-app/build.gradle.kts
new file mode 100644
index 0000000..10dae69
--- /dev/null
+++ b/docs/example/example-app/build.gradle.kts
@@ -0,0 +1,16 @@
+plugins {
+ kotlin("multiplatform")
+ id("dev.opensavvy.dokkatoo-mkdocs") version "VERSION HERE"
+}
+
+kotlin {
+ jvm()
+ js(IR) {
+ browser()
+ nodejs()
+ }
+
+ sourceSets.commonMain.dependencies {
+ implementation(projects.example.exampleCore)
+ }
+}
diff --git a/example/example-app/src/commonMain/kotlin/Main.kt b/docs/example/example-app/src/commonMain/kotlin/Main.kt
similarity index 100%
rename from example/example-app/src/commonMain/kotlin/Main.kt
rename to docs/example/example-app/src/commonMain/kotlin/Main.kt
diff --git a/docs/example/example-core/build.gradle.kts b/docs/example/example-core/build.gradle.kts
new file mode 100644
index 0000000..5c60c34
--- /dev/null
+++ b/docs/example/example-core/build.gradle.kts
@@ -0,0 +1,12 @@
+plugins {
+ kotlin("multiplatform")
+ id("dev.opensavvy.dokkatoo-mkdocs") version "VERSION HERE"
+}
+
+kotlin {
+ jvm()
+ js(IR) {
+ browser()
+ nodejs()
+ }
+}
diff --git a/example/example-core/src/commonMain/kotlin/Example.kt b/docs/example/example-core/src/commonMain/kotlin/Example.kt
similarity index 100%
rename from example/example-core/src/commonMain/kotlin/Example.kt
rename to docs/example/example-core/src/commonMain/kotlin/Example.kt
diff --git a/docs/gradle.properties b/docs/gradle.properties
new file mode 100644
index 0000000..4e93b57
--- /dev/null
+++ b/docs/gradle.properties
@@ -0,0 +1,22 @@
+# Maven coordinates
+appGroup=dev.opensavvy.dokka.mkdocs.docs
+
+# Allow Gradle to execute tasks from different subprojects in parallel.
+org.gradle.parallel=true
+
+# The Gradle Configuration Cache allows to skip the configuration phase if the environment has not changed.
+# The configuration here is quite pessimistic, and will abort the build if any issue is detected.
+# In these cases, you may want to disable to report the problem and disable the Configuration Cache.
+# See https://docs.gradle.org/current/userguide/configuration_cache.html
+org.gradle.configuration-cache=true
+org.gradle.configuration-cache.max-problems=1
+
+# The Gradle Build Cache allows to reuse previous execution results.
+# Execution results are stored by the CI pipeline in an external server, so developpers do not need to rebuild everything
+# when first cloning the project.
+# See https://docs.gradle.org/current/userguide/build_cache.html
+org.gradle.caching=true
+
+# Configuration on demand allows Gradle to only configure projects which take part in the build.
+# See https://docs.gradle.org/current/userguide/multi_project_configuration_and_execution.html#sec:configuration_on_demand
+org.gradle.configureondemand=true
diff --git a/docs/settings.gradle.kts b/docs/settings.gradle.kts
new file mode 100644
index 0000000..d02c022
--- /dev/null
+++ b/docs/settings.gradle.kts
@@ -0,0 +1,53 @@
+rootProject.name = "docs"
+
+dependencyResolutionManagement {
+ @Suppress("UnstableApiUsage")
+ repositories {
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+
+pluginManagement {
+ repositories {
+ // region OpenSavvy Conventions
+
+ maven {
+ name = "opensavvy-gradle-conventions"
+ url = uri("https://gitlab.com/api/v4/projects/51233470/packages/maven")
+
+ metadataSources {
+ gradleMetadata()
+ mavenPom()
+ }
+
+ content {
+ @Suppress("UnstableApiUsage")
+ includeGroupAndSubgroups("dev.opensavvy")
+ }
+ }
+
+ // endregion
+ // region Standard repositories
+
+ gradlePluginPortal()
+ google()
+ mavenCentral()
+
+ // endregion
+ }
+
+ includeBuild("..")
+}
+
+plugins {
+ id("dev.opensavvy.conventions.settings") version "1.5.1"
+}
+
+includeBuild("..")
+
+include(
+ "website",
+ "example:example-core",
+ "example:example-app",
+)
diff --git a/docs/website/.gitlab-ci.yml b/docs/website/.gitlab-ci.yml
index 8fbe442..20a6c57 100644
--- a/docs/website/.gitlab-ci.yml
+++ b/docs/website/.gitlab-ci.yml
@@ -5,7 +5,7 @@ mkdocs:
extends: [ .os.gradle ]
script:
- - ./gradlew :docs:website:embedDokkaIntoMkDocs -PappVersion=$project_version
+ - ./gradlew -p docs website:embedDokkaIntoMkDocs -PappVersion=$project_version
- cd docs/website
- 'echo "repo_url: $CI_PROJECT_URL">>mkdocs.yml'
- 'echo "repo_name: $CI_PROJECT_TITLE">>mkdocs.yml'
diff --git a/docs/website/mkdocs.yml b/docs/website/mkdocs.yml
index 83d2460..c0b2226 100644
--- a/docs/website/mkdocs.yml
+++ b/docs/website/mkdocs.yml
@@ -92,4 +92,18 @@ nav:
- reference.md
# !!! EMBEDDED DOKKA START, DO NOT COMMIT !!! #
+ - Reference:
+ - example-core:
+ - api/example-core/index.md
+ - opensavvy.dokka.material.mkdocs.example:
+ - api/example-core/opensavvy.dokka.material.mkdocs.example/index.md
+ - Example:
+ - api/example-core/opensavvy.dokka.material.mkdocs.example/-example/index.md
+ - api/example-core/opensavvy.dokka.material.mkdocs.example/-example/-example.md
+ - api/example-core/opensavvy.dokka.material.mkdocs.example/-example/foo.md
+ - example-app:
+ - api/example-app/index.md
+ - opensavvy.dokka.material.mkdocs.example:
+ - api/example-app/opensavvy.dokka.material.mkdocs.example/index.md
+ - api/example-app/opensavvy.dokka.material.mkdocs.example/main.md
# !!! EMBEDDED DOKKA END, DO NOT COMMIT !!! #
diff --git a/gradle/conventions/dokkatoo-mkdocs/build.gradle.kts b/dokkatoo-mkdocs/build.gradle.kts
similarity index 100%
rename from gradle/conventions/dokkatoo-mkdocs/build.gradle.kts
rename to dokkatoo-mkdocs/build.gradle.kts
diff --git a/gradle/conventions/dokkatoo-mkdocs/src/main/kotlin/DokkatooMkDocsPlugin.kt b/dokkatoo-mkdocs/src/main/kotlin/DokkatooMkDocsPlugin.kt
similarity index 100%
rename from gradle/conventions/dokkatoo-mkdocs/src/main/kotlin/DokkatooMkDocsPlugin.kt
rename to dokkatoo-mkdocs/src/main/kotlin/DokkatooMkDocsPlugin.kt
diff --git a/example/example-app/build.gradle.kts b/example/example-app/build.gradle.kts
deleted file mode 100644
index 82fc706..0000000
--- a/example/example-app/build.gradle.kts
+++ /dev/null
@@ -1,24 +0,0 @@
-plugins {
- kotlin("multiplatform")
- id("dev.opensavvy.dokkatoo-mkdocs") version "VERSION HERE"
-}
-
-kotlin {
- jvm()
- js(IR) {
- browser()
- nodejs()
- }
-
- sourceSets.commonMain.dependencies {
- implementation(projects.example.exampleCore)
- }
-}
-
-// Workaround to use the module from this repository instead of using the one that is
-// published. In a real project using the plugin, do not copy this!
-configurations.all {
- resolutionStrategy.dependencySubstitution {
- substitute(module("dev.opensavvy.dokka.mkdocs:renderer")).using(project(":renderer"))
- }
-}
diff --git a/example/example-core/build.gradle.kts b/example/example-core/build.gradle.kts
deleted file mode 100644
index f270c6c..0000000
--- a/example/example-core/build.gradle.kts
+++ /dev/null
@@ -1,20 +0,0 @@
-plugins {
- kotlin("multiplatform")
- id("dev.opensavvy.dokkatoo-mkdocs") version "VERSION HERE"
-}
-
-kotlin {
- jvm()
- js(IR) {
- browser()
- nodejs()
- }
-}
-
-// Workaround to use the module from this repository instead of using the one that is
-// published. In a real project using the plugin, do not copy this!
-configurations.all {
- resolutionStrategy.dependencySubstitution {
- substitute(module("dev.opensavvy.dokka.mkdocs:renderer")).using(project(":renderer"))
- }
-}
diff --git a/gradle/conventions/settings.gradle.kts b/gradle/conventions/settings.gradle.kts
index 11b46f1..7da3654 100644
--- a/gradle/conventions/settings.gradle.kts
+++ b/gradle/conventions/settings.gradle.kts
@@ -49,7 +49,3 @@ plugins {
}
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
-
-include(
- "dokkatoo-mkdocs",
-)
diff --git a/renderer/build.gradle.kts b/renderer/build.gradle.kts
index 48dc945..f243e12 100644
--- a/renderer/build.gradle.kts
+++ b/renderer/build.gradle.kts
@@ -1,9 +1,7 @@
-import org.jetbrains.kotlin.gradle.dsl.JvmTarget
-import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
-
plugins {
alias(opensavvyConventions.plugins.base)
kotlin("jvm")
+ id("maven-publish")
alias(opensavvyConventions.plugins.kotlin.abstractLibrary)
}
@@ -16,6 +14,14 @@ dependencies {
compileOnly(libs.dokka.core)
}
+publishing {
+ publications {
+ register("renderer") {
+ from(components["java"])
+ }
+ }
+}
+
library {
name.set("Dokka render for Material for MkDocs")
description.set("Dokka plugin that adds the Material for MkDocs format")
diff --git a/settings.gradle.kts b/settings.gradle.kts
index d6d0262..2044e38 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -54,11 +54,8 @@ plugins {
include(
"renderer",
-
- "example:example-core",
- "example:example-app",
+ "dokkatoo-mkdocs",
"gradle:templates:template-app",
"gradle:templates:template-lib",
- "docs:website",
)
--
2.51.2
From cf326de657a5e51649386bf1147657a1bf848241 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?=
Date: Tue, 1 Oct 2024 23:24:25 +0200
Subject: [PATCH 2/4] build(idea): Run configurations for when opening the
project in the Docs folder
---
.../.idea/runConfigurations/Documentation.xml | 24 ++++++++++++++
.../Documentation_website.xml | 31 +++++++++++++++++++
2 files changed, 55 insertions(+)
create mode 100644 docs/.idea/runConfigurations/Documentation.xml
create mode 100644 docs/.idea/runConfigurations/Documentation_website.xml
diff --git a/docs/.idea/runConfigurations/Documentation.xml b/docs/.idea/runConfigurations/Documentation.xml
new file mode 100644
index 0000000..ecc5927
--- /dev/null
+++ b/docs/.idea/runConfigurations/Documentation.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+ false
+ false
+
+
+
\ No newline at end of file
diff --git a/docs/.idea/runConfigurations/Documentation_website.xml b/docs/.idea/runConfigurations/Documentation_website.xml
new file mode 100644
index 0000000..f56b722
--- /dev/null
+++ b/docs/.idea/runConfigurations/Documentation_website.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
2.51.2
From 550f81f2d09836eb7424ff7de9c338af8b425ae3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?=
Date: Tue, 1 Oct 2024 23:26:31 +0200
Subject: [PATCH 3/4] build(website): Rename the section containing the Dokka
reference into 'Plugin reference'
---
docs/website/mkdocs.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/website/mkdocs.yml b/docs/website/mkdocs.yml
index c0b2226..1f4a20a 100644
--- a/docs/website/mkdocs.yml
+++ b/docs/website/mkdocs.yml
@@ -88,7 +88,7 @@ nav:
- Getting started: []
- - Reference:
+ - Plugin reference:
- reference.md
# !!! EMBEDDED DOKKA START, DO NOT COMMIT !!! #
--
2.51.2
From 6c3a39d9356827e295a146ce6b58047c74ec1899 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?=
Date: Tue, 1 Oct 2024 23:27:24 +0200
Subject: [PATCH 4/4] build: Include the Dokkatoo plugin into the documentation
---
build.gradle.kts | 1 +
1 file changed, 1 insertion(+)
diff --git a/build.gradle.kts b/build.gradle.kts
index 18944d5..a3b8200 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -22,6 +22,7 @@ plugins {
dependencies {
// List the 'library' projects
dokkatoo(projects.renderer)
+ dokkatoo(projects.dokkatooMkdocs)
}
// region Check the users of the project didn't forget to rename the group