Add spotless + license, branding change
This commit is contained in:
4
.github/workflows/build-commit.yml
vendored
4
.github/workflows/build-commit.yml
vendored
@@ -2,7 +2,7 @@
|
|||||||
# This makes use of caching for faster builds and uploads the resulting artifacts
|
# This makes use of caching for faster builds and uploads the resulting artifacts
|
||||||
name: build-commit
|
name: build-commit
|
||||||
|
|
||||||
on: [ push ]
|
on: [ push, workflow_dispatch ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-build-commit-
|
${{ runner.os }}-build-commit-
|
||||||
- name: Build artifacts
|
- name: Build artifacts
|
||||||
run: ./gradlew build
|
run: ./gradlew clean :spotlessApply build
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
14
LICENSE_header.txt
Normal file
14
LICENSE_header.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Nitori Copyright (C) $YEAR Gensokyo Reimagined
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
@@ -5,6 +5,7 @@ plugins {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.build.paperweight)
|
implementation(libs.build.paperweight)
|
||||||
implementation(libs.build.shadow)
|
implementation(libs.build.shadow)
|
||||||
|
implementation(libs.build.spotless)
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ plugins {
|
|||||||
|
|
||||||
id("com.github.johnrengelman.shadow")
|
id("com.github.johnrengelman.shadow")
|
||||||
id("io.papermc.paperweight.userdev")
|
id("io.papermc.paperweight.userdev")
|
||||||
|
id("com.diffplug.spotless")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expose version catalog
|
// Expose version catalog
|
||||||
@@ -37,3 +38,17 @@ tasks {
|
|||||||
dependsOn(reobfJar)
|
dependsOn(reobfJar)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spotless {
|
||||||
|
format("misc") {
|
||||||
|
target(project.files("*.gradle.kts", "gradle.properties", "settings.gradle.kts", "gradle/libs.versions.toml"))
|
||||||
|
|
||||||
|
trimTrailingWhitespace()
|
||||||
|
indentWithSpaces(4)
|
||||||
|
endWithNewline()
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
licenseHeaderFile("LICENSE_header.txt")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
group=com.example
|
group=net.gensokyoreimagined.nitori
|
||||||
version=1.0.0-SNAPSHOT
|
version=1.0.0-SNAPSHOT
|
||||||
description=Example mod for Ignite
|
description=Converting patches into mixins, for the Ignite Framework
|
||||||
|
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ mixin = "0.8.5"
|
|||||||
mixinExtras = "0.3.5"
|
mixinExtras = "0.3.5"
|
||||||
paperweight = "1.5.11"
|
paperweight = "1.5.11"
|
||||||
shadow = "8.1.1"
|
shadow = "8.1.1"
|
||||||
spotless = "6.23.3"
|
spotless = "6.25.0"
|
||||||
paper = "1.20.4-R0.1-SNAPSHOT"
|
paper = "1.20.4-R0.1-SNAPSHOT"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Ignite, licensed under the MIT License (MIT).
|
|
||||||
*
|
|
||||||
* Copyright (c) vectrix.space <https://vectrix.space/>
|
|
||||||
* Copyright (c) contributors
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
package net.gensokyoreimagined.gensouhacks.plugins;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
import org.objectweb.asm.tree.ClassNode;
|
|
||||||
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
|
|
||||||
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
|
|
||||||
|
|
||||||
public final class CorePlugin implements IMixinConfigPlugin {
|
|
||||||
@Override
|
|
||||||
public void onLoad(final @NotNull String mixinPackage) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public @Nullable String getRefMapperConfig() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean shouldApplyMixin(final @NotNull String targetClassName, final @NotNull String mixinClassName) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void acceptTargets(final @NotNull Set<String> myTargets, final @NotNull Set<String> otherTargets) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public @Nullable List<String> getMixins() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void preApply(final @NotNull String targetClassName, final @NotNull ClassNode targetClass, final @NotNull String mixinClassName, final @NotNull IMixinInfo mixinInfo) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void postApply(final @NotNull String targetClassName, final @NotNull ClassNode targetClass, final @NotNull String mixinClassName, final @NotNull IMixinInfo mixinInfo) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,18 @@
|
|||||||
package net.gensokyoreimagined.gensouhacks.core;
|
// Nitori Copyright (C) 2024 Gensokyo Reimagined
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
package net.gensokyoreimagined.nitori.core;
|
||||||
|
|
||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap;
|
import it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap;
|
||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||||
@@ -1,4 +1,18 @@
|
|||||||
package net.gensokyoreimagined.gensouhacks.core;
|
// Nitori Copyright (C) 2024 Gensokyo Reimagined
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
package net.gensokyoreimagined.nitori.core;
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
// Nitori Copyright (C) 2024 Gensokyo Reimagined
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
package net.gensokyoreimagined.nitori.plugins;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import org.objectweb.asm.tree.ClassNode;
|
||||||
|
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
|
||||||
|
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
|
||||||
|
|
||||||
|
public final class CorePlugin implements IMixinConfigPlugin {
|
||||||
|
@Override
|
||||||
|
public void onLoad(final @NotNull String mixinPackage) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @Nullable String getRefMapperConfig() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldApplyMixin(final @NotNull String targetClassName, final @NotNull String mixinClassName) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void acceptTargets(final @NotNull Set<String> myTargets, final @NotNull Set<String> otherTargets) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @Nullable List<String> getMixins() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void preApply(final @NotNull String targetClassName, final @NotNull ClassNode targetClass, final @NotNull String mixinClassName, final @NotNull IMixinInfo mixinInfo) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void postApply(final @NotNull String targetClassName, final @NotNull ClassNode targetClass, final @NotNull String mixinClassName, final @NotNull IMixinInfo mixinInfo) {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"id": "example",
|
"id": "Nitori",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"mixins.core.json"
|
"mixins.core.json"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"minVersion": "0.8.5",
|
"minVersion": "0.8.5",
|
||||||
"package": "net.gensokyoreimagined.gensouhacks.core",
|
"package": "net.gensokyoreimagined.nitori.core",
|
||||||
"plugin": "net.gensokyoreimagined.gensouhacks.plugins.CorePlugin",
|
"plugin": "net.gensokyoreimagined.nitori.plugins.CorePlugin",
|
||||||
"target": "@env(DEFAULT)",
|
"target": "@env(DEFAULT)",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"server": [
|
"server": [
|
||||||
|
|||||||
Reference in New Issue
Block a user