From fb647d77891df0da42c22c451b3a0835387dec53 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sun, 2 Jun 2024 23:45:33 +0200 Subject: [PATCH] chore: don't use refinedstorage2 in mod ids --- .github/CONTRIBUTING.md | 36 +++++------ .github/workflows/publish-release.yml | 2 +- README.md | 12 ++-- build.gradle | 10 +-- config/intellij-code-style.xml | 64 +++++++++++++++++++ gradle.properties | 2 +- .../mekanism/ModInitializer.java | 7 +- .../mekanism/package-info.java | 6 +- src/main/resources/META-INF/mods.toml | 14 ++-- src/main/resources/pack.mcmeta | 2 +- 10 files changed, 106 insertions(+), 49 deletions(-) create mode 100644 config/intellij-code-style.xml rename src/main/java/com/refinedmods/{refinedstorage2 => refinedstorage}/mekanism/ModInitializer.java (70%) rename src/main/java/com/refinedmods/{refinedstorage2 => refinedstorage}/mekanism/package-info.java (80%) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 54a2c49..88251ba 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,6 +4,20 @@ When contributing to this repository, please first discuss the change you wish t [GitHub issues](https://github.com/refinedmods/refinedarchitect-template/issues), [Discord](https://discordapp.com/invite/VYzsydb), or any other method with the owners of this repository before making a change. +## Quickstart + +These are the most important things to know before contributing (also explained in more detail later in this document): + +- Commit messages must adhere to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). +- Branch names must be formatted correctly. The format is `{category}/GH-{issue number}/{lowercase-description}`. + Category must match a + category [used in our Commitlint config](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum). +- We use [Checkstyle](https://checkstyle.sourceforge.io/) in our build workflow to validate coding style. It is + recommended to import the [config/checkstyle/checkstyle.xml](../config/checkstyle/checkstyle.xml) or [config/intellij-code-style.xml](../config/intellij-code-style.xml) file into your + IDE, so that formatting rules are respected. +- Branches are kept up to date by rebasing, not by merging. +- For non-technical changes, adding a changelog entry is required. + ## Pull requests - Keep your pull request (PR) as small as possible, this makes reviewing easier. @@ -46,26 +60,6 @@ Valid examples are: This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -### Version metadata - -The code doesn't contain version metadata: `build.gradle` specifies a version of `0.0.0` (via Refined Architect). -The versioning information is entirely contained in Git by using tags. - -Per [Semantic Versioning](https://semver.org/spec/v2.0.0.html), the version number being released depends on the changes -in that release. We usually can't predict those -changes at the start of a release cycle, so we can't bump the version at the start of a release cycle. That means that -the version number being released is determined at release time. - -Because the version number is determined at release time, we can't store any versioning metadata in the -code (`build.gradle`). If we did, `build.gradle` would have the version number of the latest released version during the -release cycle of the new version, which isn't correct. - -### Dealing with Minecraft - -Whenever we port to a new Minecraft version, at least the minor version should be incremented. - -This is needed so that we can still support older Minecraft versions without the version numbers conflicting. - ## Changelog The changelog is kept in `CHANGELOG.md`. @@ -95,7 +89,7 @@ from [API Guardian](https://github.com/apiguardian-team/apiguardian). We use [Checkstyle](https://checkstyle.sourceforge.io/) in our build workflow to validate coding style. -It is recommended to import the [config/checkstyle/checkstyle.xml](../config/checkstyle/checkstyle.xml) file into your +It is recommended to import the [config/checkstyle/checkstyle.xml](../config/checkstyle/checkstyle.xml) or [config/intellij-code-style.xml](../config/intellij-code-style.xml) file into your IDE, so that formatting rules are respected. Moreover, the [CheckStyle-IDEA plugin](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea) can be used to check diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index d1b2de6..dee4493 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -10,5 +10,5 @@ jobs: uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.12.1 secrets: inherit with: - project-name: 'Refined Storage 2 - Mekanism Integration' + project-name: 'Refined Storage - Mekanism Integration' mutation-testing: false \ No newline at end of file diff --git a/README.md b/README.md index a0bc738..2b55e5d 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# Refined Storage 2 - Mekanism Integration [![Build Status](https://github.com/refinedmods/refinedstorage2-mekanism-integration/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/refinedmods/refinedstorage2-mekanism-integration/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage2-mekanism-integration&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage2-mekanism-integration) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage2-mekanism-integration&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage2-mekanism-integration) [![Discord](https://img.shields.io/discord/342942776494653441)](https://discordapp.com/invite/VYzsydb) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md) +# Refined Storage - Mekanism Integration [![Build Status](https://github.com/refinedmods/refinedstorage-mekanism-integration/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/refinedmods/refinedstorage-mekanism-integration/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-mekanism-integration&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-mekanism-integration) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-mekanism-integration&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-mekanism-integration) [![Discord](https://img.shields.io/discord/342942776494653441)](https://discordapp.com/invite/VYzsydb) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md) ## About -Mekanism integration for [Refined Storage 2](https://github.com/refinedmods/refinedstorage2). +Mekanism integration for [Refined Storage](https://github.com/refinedmods/refinedstorage2). ## Links -- [GitHub](https://github.com/refinedmods/refinedstorage2-mekanism-integration) - - [Releases](https://github.com/refinedmods/refinedstorage2-mekanism-integration/releases) - - [Packages](https://github.com/refinedmods/refinedstorage2-mekanism-integration/packages) - - [Issues](https://github.com/refinedmods/refinedstorage2-mekanism-integration/issues) +- [GitHub](https://github.com/refinedmods/refinedstorage-mekanism-integration) + - [Releases](https://github.com/refinedmods/refinedstorage-mekanism-integration/releases) + - [Packages](https://github.com/refinedmods/refinedstorage-mekanism-integration/packages) + - [Issues](https://github.com/refinedmods/refinedstorage-mekanism-integration/issues) - [Refined Mods on GitHub](https://github.com/refinedmods) - [Discord](https://discordapp.com/invite/VYzsydb) - [Twitter](https://twitter.com/refinedmods) diff --git a/build.gradle b/build.gradle index 83b9cf7..875a59f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,10 @@ apply from: "https://raw.githubusercontent.com/refinedmods/refinedarchitect/v0.12.1/helper.gradle" -group = 'com.refinedmods.refinedstorage2' +group = 'com.refinedmods.refinedstorage' -forgeProject("refinedstorage2_mekanism_integration") +forgeProject("refinedstorage_mekanism_integration") -archivesBaseName = 'refinedstorage2-mekanism-integration' +archivesBaseName = 'refinedstorage-mekanism-integration' repositories { maven { @@ -24,7 +24,7 @@ repositories { } dependencies { - implementation("com.refinedmods.refinedstorage2:refinedstorage2-platform-forge:${refinedstorage2Version}") { + implementation("com.refinedmods.refinedstorage2:refinedstorage2-platform-forge:${refinedstorageVersion}") { transitive = false } compileOnly("mekanism:Mekanism:${minecraftVersion}-${mekanismVersion}:api") @@ -34,4 +34,4 @@ dependencies { } enablePublishing() -enableSonarQube("refinedmods_refinedstorage2-mekanism-integration") +enableSonarQube("refinedmods_refinedstorage-mekanism-integration") diff --git a/config/intellij-code-style.xml b/config/intellij-code-style.xml new file mode 100644 index 0000000..be27458 --- /dev/null +++ b/config/intellij-code-style.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 13c657f..56fee54 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ # Gradle org.gradle.jvmargs=-Xmx1G -refinedstorage2Version=2.0.0-milestone.3.6 +refinedstorageVersion=2.0.0-milestone.3.6 mekanismVersion=10.5.20.41 \ No newline at end of file diff --git a/src/main/java/com/refinedmods/refinedstorage2/mekanism/ModInitializer.java b/src/main/java/com/refinedmods/refinedstorage/mekanism/ModInitializer.java similarity index 70% rename from src/main/java/com/refinedmods/refinedstorage2/mekanism/ModInitializer.java rename to src/main/java/com/refinedmods/refinedstorage/mekanism/ModInitializer.java index 35b8d34..ee844d8 100644 --- a/src/main/java/com/refinedmods/refinedstorage2/mekanism/ModInitializer.java +++ b/src/main/java/com/refinedmods/refinedstorage/mekanism/ModInitializer.java @@ -1,7 +1,6 @@ -package com.refinedmods.refinedstorage2.mekanism; +package com.refinedmods.refinedstorage.mekanism; import com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil; - import mekanism.api.MekanismAPI; import net.neoforged.bus.api.IEventBus; import net.neoforged.fml.common.Mod; @@ -10,13 +9,13 @@ @Mod(ModInitializer.ID) public final class ModInitializer { - public static final String ID = "refinedstorage2_mekanism_integration"; + public static final String ID = "refinedstorage_mekanism_integration"; private static final Logger LOGGER = LoggerFactory.getLogger(ModInitializer.class); public ModInitializer(final IEventBus eventBus) { LOGGER.info( - "Refined Storage 2 - Mekanism Integration has loaded. RS2 ModId: {}, Mekanism API version: {}", + "Refined Storage - Mekanism Integration has loaded. RS2 ModId: {}, Mekanism API version: {}", IdentifierUtil.MOD_ID, MekanismAPI.API_VERSION ); diff --git a/src/main/java/com/refinedmods/refinedstorage2/mekanism/package-info.java b/src/main/java/com/refinedmods/refinedstorage/mekanism/package-info.java similarity index 80% rename from src/main/java/com/refinedmods/refinedstorage2/mekanism/package-info.java rename to src/main/java/com/refinedmods/refinedstorage/mekanism/package-info.java index 0ed1216..04d2902 100644 --- a/src/main/java/com/refinedmods/refinedstorage2/mekanism/package-info.java +++ b/src/main/java/com/refinedmods/refinedstorage/mekanism/package-info.java @@ -1,7 +1,7 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.mekanism; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; +package com.refinedmods.refinedstorage.mekanism; import javax.annotation.ParametersAreNonnullByDefault; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index e63da2e..676d22a 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,22 +1,22 @@ modLoader = "javafml" loaderVersion = "[2,)" -issueTrackerURL = "https://github.com/refinedmods/refinedstorage2-mekanism-integration" +issueTrackerURL = "https://github.com/refinedmods/refinedstorage-mekanism-integration" license = "MIT" [[mods]] -modId = "refinedstorage2_mekanism_integration" +modId = "refinedstorage_mekanism_integration" version = "${version}" -displayName = "Refined Storage 2 - Mekanism Integration" -displayURL = "https://github.com/refinedmods/refinedstorage2-mekanism-integration" +displayName = "Refined Storage - Mekanism Integration" +displayURL = "https://github.com/refinedmods/refinedstorage-mekanism-integration" authors = "Refined Mods" description = ''' -Mekanism integration for Refined Storage 2. +Mekanism integration for Refined Storage. ''' -[[dependencies.refinedstorage2_mekanism_integration]] +[[dependencies.refinedstorage_mekanism_integration]] modId = "refinedstorage2" type = "required" versionRange = "2.0.0-milestone.3.6" side = "BOTH" -[[dependencies.refinedstorage2_mekanism_integration]] +[[dependencies.refinedstorage_mekanism_integration]] modId = "mekanism" type = "required" versionRange = "[10.5,11-)" diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index 28268b3..c0aa38b 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,7 +1,7 @@ { "pack": { "description": { - "text": "Refined Storage 2 - Mekanism Integration resources" + "text": "Refined Storage - Mekanism Integration resources" }, "pack_format": 18 }