1
mirror of https://github.com/CarmJos/MineConfiguration.git synced 2026-06-05 06:51:49 +08:00

Compare commits

...

5 Commits

12 changed files with 91 additions and 25 deletions
+9
View File
@@ -0,0 +1,9 @@
# MineConfiguration Javadoc
基于 [Github Pages](https://pages.github.com/) 搭建,请访问 [JavaDoc](https://carmjos.github.io/MineConfiguration) 。
## 如何实现?
若您也想通过 [Github Actions](https://docs.github.com/en/actions/learn-github-actions)
自动部署项目的Javadoc到 [Github Pages](https://pages.github.com/)
可以参考我的文章 [《自动部署Javadoc到Github Pages》](https://pages.carm.cc/doc/javadoc-in-github.html) 。
+63 -1
View File
@@ -58,4 +58,66 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASS }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
javadoc-deploy:
name: "Deploy Javadoc (Github Pages)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Set up JDK"
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: "Generate Javadoc"
run: mvn -B javadoc:aggregate --file pom.xml -DskipTests
- name: "Copy Javadoc"
run: |
rm -rf docs
mkdir -vp docs
cp -vrf target/site/apidocs/* docs/
cp -vrf .documentation/javadoc/JAVADOC-README.md docs/README.md
- name: "Generate Sitemap"
id: sitemap
uses: cicirello/generate-sitemap@v1
with:
base-url-path: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}
path-to-root: docs
- name: Output stats
run: |
echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
ls -l docs
- name: Configure Git
env:
DEPLOY_PRI: ${{secrets.DEPLOY_PRI}}
run: |
sudo timedatectl set-timezone "Asia/Shanghai"
mkdir -p ~/.ssh/
echo "$DEPLOY_PRI" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
git config --global user.name '${{ github.repository_owner }}'
git config --global user.email '${{ github.repository_owner }}@users.noreply.github.com'
- name: Commit documentation changes
run: |
cd docs
git init
git remote add origin ${{ github.repositoryUrl }}
git checkout -b gh-pages
git add -A
git commit -m "API Document generated."
- name: Javadoc Website Push
run: |
cd docs
git push origin HEAD:gh-pages --force
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>mineconfiguration-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.4.0</version>
<version>1.4.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>mineconfiguration-bukkit</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.4.0</version>
<version>1.4.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>
@@ -17,11 +17,11 @@ import java.util.function.Function;
public class ItemConfigBuilder extends AbstractCraftBuilder<ItemConfig, ItemConfigBuilder> {
protected Material type;
protected short data;
protected String name;
protected short data = 0;
protected String name = null;
protected List<String> lore = new ArrayList<>();
protected @NotNull String[] params;
protected @NotNull String[] params = new String[0];
protected @NotNull Function<@NotNull String, @NotNull String> paramFormatter = ParamsUtils.DEFAULT_PARAM_FORMATTER;
public ItemConfigBuilder defaults(@NotNull Material type,
@@ -28,7 +28,7 @@ public class TitleConfigBuilder extends AbstractCraftBuilder<TitleConfig, TitleC
}
};
protected @NotNull String[] params;
protected @NotNull String[] params = new String[0];
protected @Range(from = 0L, to = Integer.MAX_VALUE) int fadeIn = 10;
protected @Range(from = 0L, to = Integer.MAX_VALUE) int stay = 60;
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>mineconfiguration-bukkit</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.4.0</version>
<version>1.4.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>
@@ -34,11 +34,6 @@ public class BukkitConfigProvider extends CraftConfigProvider {
return CraftSectionWrapper.of(this.configuration);
}
@Override
public void reload() throws Exception {
configuration.load(getFile());
}
@Override
public void save() throws Exception {
configuration.save(getFile());
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>mineconfiguration-bukkit</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.4.0</version>
<version>1.4.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>mineconfiguration-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.4.0</version>
<version>1.4.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>mineconfiguration-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.4.0</version>
<version>1.4.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+9 -9
View File
@@ -3,12 +3,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modules>
<module>common</module>
<module>platform/bungee</module>
<module>platform/bukkit</module>
</modules>
<properties>
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
@@ -20,8 +14,14 @@
</properties>
<groupId>cc.carm.lib</groupId>
<artifactId>mineconfiguration-parent</artifactId>
<version>1.4.0</version>
<version>1.4.3</version>
<packaging>pom</packaging>
<modules>
<module>common</module>
<module>platform/bungee</module>
<module>platform/bukkit</module>
</modules>
<name>MineConfiguration</name>
<description>EasyConfiguration for MineCraft.</description>
@@ -46,8 +46,8 @@
<licenses>
<license>
<name>The MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
<url>https://www.gnu.org/licenses/lgpl-3.0.html</url>
</license>
</licenses>