Skip to content

Commit

Permalink
Merge pull request #10 from refinedmods/chore/GH-1/naming
Browse files Browse the repository at this point in the history
chore: don't use refinedstorage2 in mod ids
  • Loading branch information
raoulvdberge authored Jun 2, 2024
2 parents b290713 + fb647d7 commit 3f79b11
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 49 deletions.
36 changes: 15 additions & 21 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
uses: refinedmods/refinedarchitect/.github/workflows/[email protected]
secrets: inherit
with:
project-name: 'Refined Storage 2 - Mekanism Integration'
project-name: 'Refined Storage - Mekanism Integration'
mutation-testing: false
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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")
Expand All @@ -34,4 +34,4 @@ dependencies {
}

enablePublishing()
enableSonarQube("refinedmods_refinedstorage2-mekanism-integration")
enableSonarQube("refinedmods_refinedstorage-mekanism-integration")
64 changes: 64 additions & 0 deletions config/intellij-code-style.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<code_scheme name="Refined Mods" version="173">
<JavaCodeStyleSettings>
<option name="SPACE_INSIDE_ONE_LINE_ENUM_BRACES" value="true" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value />
</option>
<option name="IMPORT_LAYOUT_TABLE">
<value>
<package name="com.refinedmods.refinedstorage" withSubpackages="true" static="false" />
<emptyLine />
<package name="java" withSubpackages="true" static="false" />
<package name="javax" withSubpackages="true" static="false" />
<emptyLine />
<package name="" withSubpackages="true" static="false" />
<emptyLine />
<package name="" withSubpackages="true" static="true" />
</value>
</option>
</JavaCodeStyleSettings>
<ScalaCodeStyleSettings>
<option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
</ScalaCodeStyleSettings>
<codeStyleSettings language="Cookie">
<indentOptions>
<option name="USE_TAB_CHARACTER" value="false" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="RIGHT_MARGIN" value="120" />
<option name="BLANK_LINES_BEFORE_PACKAGE" value="1" />
<option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="RESOURCE_LIST_WRAP" value="1" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="THROWS_LIST_WRAP" value="1" />
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
<option name="THROWS_KEYWORD_WRAP" value="1" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="TERNARY_OPERATION_WRAP" value="1" />
<option name="FOR_STATEMENT_WRAP" value="1" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="ASSIGNMENT_WRAP" value="1" />
<option name="ASSERT_STATEMENT_WRAP" value="1" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
<option name="PARAMETER_ANNOTATION_WRAP" value="1" />
<option name="VARIABLE_ANNOTATION_WRAP" value="1" />
<option name="ENUM_CONSTANTS_WRAP" value="1" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="NBTT">
<indentOptions>
<option name="USE_TAB_CHARACTER" value="false" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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
);
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
14 changes: 7 additions & 7 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
@@ -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-)"
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"pack": {
"description": {
"text": "Refined Storage 2 - Mekanism Integration resources"
"text": "Refined Storage - Mekanism Integration resources"
},
"pack_format": 18
}
Expand Down

0 comments on commit 3f79b11

Please sign in to comment.