Skip to content

Commit

Permalink
Merge pull request #1 from devOS-Sanity-Edition/kt/documentation/1.20…
Browse files Browse the repository at this point in the history
….4/a

Inner Pastels Documentation
  • Loading branch information
asoji authored Feb 26, 2024
2 parents 6c97fa3 + eb4d161 commit 9994eac
Show file tree
Hide file tree
Showing 21 changed files with 1,018 additions and 47 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: docs
on: [ push, workflow_dispatch ]
permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: make gradle wrapper executable
run: chmod +x ./gradlew

- name: Run Dokka Task
uses: gradle/gradle-build-action@v2
with:
cache-read-only: true
arguments: dokkaHtml

- name: Deploy Documentations
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/dokka/html
48 changes: 48 additions & 0 deletions Module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Module Inner Pastels

Library mod to share helper functions between Softer Pastels, Desolated Pastels, and any other future projects from asoji [probably]

```Bash
src/main/kotlin
└───gay.asoji.innerpastels
├───blocks
├───datagen
├───foods
├───items
├───misc
└───tags
```

If you could think of a way to make all the package descriptors a bit better at explaining what they are, please feel free to make a PR with the `documentation` tag. plsandthx

# Package gay.asoji.innerpastels

Main root package

# Package gay.asoji.innerpastels.crab

Crab in the code 🦀

# Package gay.asoji.innerpastels.blocks

Custom Block classes or Block helpers

# Package gay.asoji.innerpastels.datagen

Helpers for Data Generation

# Package gay.asoji.innerpastels.foods

Helpers for Food related code

# Package gay.asoji.innerpastels.items

Custom Item classes or Item Helpers

# Package gay.asoji.innerpastels.misc

Any code or helpers that don't fall under any clear category

# Package gay.asoji.innerpastels.tags

Custom Block and Item tags
24 changes: 20 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.dokka.base.DokkaBaseConfiguration
import java.net.URL

buildscript {
dependencies {
Expand All @@ -24,6 +25,7 @@ group = project.property("maven_group")!!

repositories {
maven { url = uri("https://maven.parchmentmc.org") }
maven { url = uri("https://mvn.devos.one/snapshots") }
}

//All dependencies and their versions are in ./gradle/libs.versions.toml
Expand All @@ -40,17 +42,31 @@ dependencies {
modImplementation(libs.fabric.loader)
modImplementation(libs.fabric.api)

dokkaHtmlPlugin(libs.dokka.`as`.java)
include(modImplementation("gay.asoji:fmw:1.0.0+build.8")!!)
}

tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets {
named("main") {
moduleName.set("Inner Pastels")

includes.from("Module.md")

sourceLink {
localDirectory.set(file("src/main/kotlin"))
remoteUrl.set(URL("http://github.com/devOS-Sanity-Edition/InnerPastels/tree/main/" + "src/main/kotlin"))
remoteLineSuffix.set("#L")
}
}
}
pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
// customAssets = listOf(file("my-image.png"))
// customStyleSheets = listOf(file("my-styles.css"))
footerMessage = "(c) 2024 asoji"
separateInheritedMembers = false
footerMessage = "(c) 2024 devOS: Sanity Edition, Team Nautical, asoji"
separateInheritedMembers = true

// templatesDir = file("dokka/templates")
mergeImplicitExpectActualDeclarations = false
mergeImplicitExpectActualDeclarations = true
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Mod Properties
mod_version=1.0.0
mod_version=1.0.1
maven_group=gay.asoji
archives_base_name=innerpastels

Expand Down
5 changes: 3 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ fabric-loader = "0.15.3"
fabric-api = "0.95.4+1.20.4"
fabric_language_kotlin = "1.10.17+kotlin.1.9.22"

dokka_as_java = "1.9.10"
dokka = "1.9.10"

[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
fabric_loader = { module = "net.fabricmc:fabric-loader", version.ref = "fabric-loader" }
fabric-api = { module = "net.fabricmc.fabric-api:fabric-api", version.ref = "fabric-api" }
fabric_language_kotlin = { module = "net.fabricmc:fabric-language-kotlin", version.ref = "fabric_language_kotlin" }

dokka_as_java = { module = "org.jetbrains.dokka:kotlin-as-java-plugin", version.ref = "dokka_as_java" }
dokka_as_java = { module = "org.jetbrains.dokka:kotlin-as-java-plugin", version.ref = "dokka" }
dokka_versioning = { module = "org.jetbrains.dokka:versioning-plugin", version.ref = "dokka" }

[plugins]
grgit = { id = "org.ajoberstar.grgit", version = "5.2.1"}
Expand Down
14 changes: 13 additions & 1 deletion src/main/kotlin/gay/asoji/innerpastels/InnerPastels.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
package gay.asoji.innerpastels

import gay.asoji.fmw.FMW
import gay.asoji.innerpastels.crab.CrabInTheCode
import net.fabricmc.api.ModInitializer
import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.Logger

/**
* Inner Pastels Internal Library, meant to be used for Softer Pastels, Desolated Pastels, and any other future *Pastel mods.
* This library adds a lot of common code and helper functions to assist with development for *Pastel mods, especially for Blocks, Items, and Data Generation.
*
* @author asojidev
* @version 1.0.1
*/
object InnerPastels : ModInitializer {
val LOGGER: Logger = LogManager.getLogger(FMW.getName("innerpastels"))
override fun onInitialize() {

CrabInTheCode.crabDeezNuts("oh hello fren!")
}

}
Loading

0 comments on commit 9994eac

Please sign in to comment.