Skip to content

Commit

Permalink
Used MkDocs to build instruction #20
Browse files Browse the repository at this point in the history
  • Loading branch information
liplum committed Jul 13, 2022
1 parent 23149c0 commit 412866f
Show file tree
Hide file tree
Showing 12 changed files with 251 additions and 11 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Deploy MkDocs to gh-pages
on:
push:
branches:
- master
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/build
/.gradle
/.idea
/.idea
/site
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ version [![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/i
**Because this plugin was made in Kotlin, using Kotlin as your DSL is recommended.**
| Pages | Instances |
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Usages | [Groovy DSL](https://plumygame.github.io/mgpp/groovy.html), [Kotlin DSL](https://plumygame.github.io/mgpp/kotlin.html) |
| Samples | [Groovy Sample](https://github.com/PlumyGame/mgpp/tree/master/TestProjectGroovy), [Kotlin Sample](https://github.com/PlumyGame/mgpp/tree/master/TestProjectKt) |
| Documents | [JavaDoc](https://plumygame.github.io/mgppDoc/index.html) |
| Mod Templates | [MDT Mod Template](https://github.com/liplum/MdtModTemplate) |
| Pages | Instances |
|:-------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| Usages | [Groovy DSL](https://plumygame.github.io/mgpp/groovy.html), [Kotlin DSL](https://plumygame.github.io/mgpp/kotlin.html) |
| Samples | [Groovy Sample](https://github.com/PlumyGame/mgpp/tree/master/TestProjectGroovy), [Kotlin Sample](https://github.com/PlumyGame/mgpp/tree/master/TestProjectKt) |
| Documents | [JavaDoc](https://plumygame.github.io/mgppDoc/index.html) |
| Mod Templates | [MDT Mod Template](https://github.com/liplum/MdtModTemplate) |
## License
Expand Down
2 changes: 1 addition & 1 deletion TestMultiproject/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import io.github.liplum.mindustry.mindustry
group = "plumy.test"
version = "1.0"
plugins {
id("io.github.liplum.mgpp") version "1.1.1"
id("io.github.liplum.mgpp") version "1.1.2"
}
mindustry {
dependency {
Expand Down
2 changes: 1 addition & 1 deletion TestProjectGroovy/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id "io.github.liplum.mgpp" version "1.1.1"
id "io.github.liplum.mgpp" version "1.1.2"
}
group 'plumy.test'
version '0.1'
Expand Down
2 changes: 1 addition & 1 deletion TestProjectKt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.7.0"
id("io.github.liplum.mgpp") version "1.1.1"
id("io.github.liplum.mgpp") version "1.1.2
}
sourceSets {
Expand Down
125 changes: 125 additions & 0 deletions docs/home/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Installation
MGPP was published on [Gradle Plugin Portal](https://plugins.gradle.org/plugin/io.github.liplum.mgpp).

Please make sure to always upgrade MGPP to the latest version: [![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/io.github.liplum.mgpp?color=02303a&label=&logo=Gradle&style=for-the-badge)](https://plugins.gradle.org/plugin/io.github.liplum.mgpp)

## Gradle setup
- Using the [plugins DSL](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block):
=== "Groovy"

``` groovy
plugins {
id "io.github.liplum.mgpp" version "<version>"
}
```

=== "Kotlin"

``` kotlin
plugins {
id("io.github.liplum.mgpp") version "<version>"
}
```
- Using [legacy plugin application](https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_application):
=== "Groovy"

``` groovy
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "io.github.liplum.mgpp:MindustryGradlePluginPlumy:<version>"
}
}

apply plugin: "io.github.liplum.mgpp"
```

=== "Kotlin"

``` kotlin
buildscript {
repositories {
maven { url = uri("https://plugins.gradle.org/m2/") }
}
dependencies {
classpath("io.github.liplum.mgpp:MindustryGradlePluginPlumy:<version>")
}
}

apply(plugin = "io.github.liplum.mgpp")
```

## Configuration
For ease of understanding, simplified examples are used here. Of course, it can still work for you.

=== "Groovy"

```groovy
mindustry {
dependency {
mindustry version: 'v135'
arc version: 'v135'
}
client {
official version: 'v135'
}
server {
official version: 'v135'
}
}
mindustryAssets {
rootAt "$projectDir/assets"
}
```
=== "Kotlin"

```kotlin
import io.github.liplum.mindustry.*
mindustry {
dependency {
mindustry on "v135"
arc on "v135"
}
client {
mindustry official "v135"
}
server {
mindustry official "v135"
}
}
mindustryAssets {
root at "$projectDir/assets"
}
```

## Dependency setup
You can improt the repositories where Mindustry was published by `mindustryRepo()`.

You can use `importMindustry()` to import the Mindustry dependencies you have configured above.

=== "Groovy"

``` groovy
repositories {
mavenCentral()
mindustryRepo()
}
dependencies {
importMindustry()
}
```

=== "Kotlin"

``` kotlin
import io.github.liplum.mindustry.*
repositories {
mavenCentral()
mindustryRepo()
}
dependencies {
importMindustry()
}
```
7 changes: 7 additions & 0 deletions docs/home/samples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Samples

## Templates
There is a [template](https://github.com/liplum/MdtModTemplate) already initilized with mgpp for whom first time try mgpp.

## Samples
There are two official sample projects for testing purposes: [Groovy Sample](https://github.com/PlumyGame/mgpp/tree/master/TestProjectGroovy), [Kotlin Sample](https://github.com/PlumyGame/mgpp/tree/master/TestProjectKt), [Multi-project Sample](https://github.com/PlumyGame/mgpp/tree/master/TestMultiproject).
42 changes: 42 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Welcome to MGPP
[![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/io.github.liplum.mgpp?color=02303a&label=Gradle%20Plugin&logo=Gradle&style=for-the-badge)](https://plugins.gradle.org/plugin/io.github.liplum.mgpp) [![Discord](https://img.shields.io/discord/937228972041842718?color=b5e853&label=Discord&logo=Discord&style=for-the-badge)](https://discord.gg/3Hrep3WtUz)

MGPP is an unofficial gradle plugin for Mindustry modding.

It provides lots of functionalities for you to develop a mod or plugin.

## Features
- Manage the Dependencies
> Importing the dependencies of arc and Mindustry automatically with configuration.
- Download the Game
> Downloading any version of Mindustry easily.
- Debug your Mod
> Being able to debug your mod and Mindustry with an IDE, such as IntelliJ IDEA.
- Work with Other Mods
> Starting the game with your mod and others to test the compatibility or interaction.
- Separate Working Space
> The configurable data directory of Mindustry Client located in a temporarily folder as default to separate the envrionments of your all projects.
- Manage your Assets
> Assets will be copied into the output jar file with configuration.
- Generate Resource Class
> A class with references of assets to reduce boilerplate codes.
- Deploy on Android
> Deploy your mod compatible to Mindustry on Android. *[Android SDK Required]*
## Information
You can access the [repository](https://github.com/PlumyGame/mgpp) on GitHub to obtain more information.

Also, there is a [JavaDoc page](https://plumygame.github.io/mgppDoc/index.html) for you to check up the API of mgpp.

If you face any issue with mgpp, please contact us on [Issue Report](https://github.com/PlumyGame/mgpp/issues) page.

Join our [Discord server](https://discord.gg/3Hrep3WtUz) to send us feedback immediately.

Welcome to contribute mgpp!
1 change: 1 addition & 0 deletions docs/mindustry/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Mindustry Extension
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ kotlin.code.style=official
kotlinVersion=1.6.21
pluginName=PlumyMindustryGradlePlugin
arcVersion=123fbf12b9
mgppVersion=1.1.1
mgppVersion=1.1.2
48 changes: 48 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
site_name: MGPP Instruction
theme:
name: material
shortcuts:
help: 191 # ?
next: 78 # n
previous: 66 # p
search: 83 # s
features:
- navigation.tabs
- content.tabs.link
palette:
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/weather-night
name: Switch to light mode

#page tree
nav:
- Home:
- Overview: index.md
- Installation: home/installation.md
- Samples: home/samples.md

- Mindustry:
- Overview: mindustry/overview.md

- Assets:
- Overview: assets/overview.md

- Task:
- Overview: task/overview.md

markdown_extensions:
- pymdownx.tabbed:
alternate_style: true
- pymdownx.superfences
- toc:
permalink: "#"

0 comments on commit 412866f

Please sign in to comment.