Skip to content

Commit

Permalink
migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
KrLite committed Apr 21, 2024
1 parent a7b9f81 commit afcc58f
Show file tree
Hide file tree
Showing 17 changed files with 117 additions and 68 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/build.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/call_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Build

on: [ pull_request, push, workflow_dispatch ]

jobs:
call-workflow:
uses: KessokuTeaTime/.github/.github/workflows/build.yml@main
15 changes: 15 additions & 0 deletions .github/workflows/call_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Publish Release

on:
workflow_dispatch:
release:
types:
- published

permissions:
contents: write

jobs:
call-workflow:
uses: KessokuTeaTime/.github/.github/workflows/release.yml@main
secrets: inherit
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Changes

- Unified publishing using **modpublisher.**
- Jar name migrate: `{id}-{mcversion}-{modversion}` -> `{id}-{modversion}-{loader}{mcversion}`.
- Tag name migrate: `{id}-{modversion}-mc{mcversion}` -> `{id}-{modversion}-{loader}{mcversion}`.

### Ownership Transfer

- **Transferred** ownership to **[Kessoku Tea Time.](https://github.com/KessokuTeaTime)**
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
### <p align=right>[`` Modrinth](https://modrinth.com/mod/it-follows!)</p>
### <p align=right>[`` CurseForge](https://www.curseforge.com/minecraft/mc-mods/it-follows-exclamation)&ensp;[`` Modrinth](https://modrinth.com/mod/it-follows!)</p>

# It Follows!

This useful mod sticks your cursor to the `GUI Scale` button when adjusting the GUI scaling, so you just don't need to move your cursor to the little widget again and again anymore.

Just like this:

![Demonstration](https://github.com/KrLite/Mod.It-Follows-Exclamation/blob/artwork/content/demonstration.gif)
![demonstration](https://github.com/KessokuTeaTime/It-Follows-Exclamation/blob/artwork/content/demonstration.gif)

## License

Expand Down
53 changes: 49 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
class Display {
lateinit var name: String
lateinit var loader: String
lateinit var version: String
}

var display: Display = Display()

plugins {
base
java
idea
`maven-publish`
alias(libs.plugins.fabric.loom)
alias(libs.plugins.modpublisher)
}

group = libs.versions.maven.group.get()
version = "${libs.versions.minecraft.get()}-${libs.versions.mod.get()}"
version = "${libs.versions.mod.get()}-${libs.versions.loader.get()}${libs.versions.minecraft.get()}"

display.name = libs.versions.display.name.get()
display.loader = libs.versions.display.loader.get()
display.version = libs.versions.display.version.get()

base {
archivesName.set(libs.versions.archives.name)
Expand Down Expand Up @@ -36,10 +49,11 @@ loom {

tasks {
processResources {
inputs.property("version", libs.versions.mod.get())

filesMatching("fabric.mod.json") {
expand(mapOf("version" to libs.versions.mod.get()))
expand(mapOf(
"version" to libs.versions.mod.get(),
"display" to display
))
}
}

Expand All @@ -58,3 +72,34 @@ publishing {
repositories {
}
}

publisher {
apiKeys {
modrinth(System.getenv("MODRINTH_TOKEN"))
curseforge(System.getenv("CURSEFORGE_TOKEN"))
}

modrinthID.set(libs.versions.id.modrinth)
curseID.set(libs.versions.id.curseforge)

versionType.set("release")
projectVersion.set(project.version.toString())
gameVersions.set(listOf("1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4"))
loaders.set(listOf("fabric", "quilt"))
curseEnvironment.set("client")

modrinthDepends.required("fabric-api")
modrinthDepends.optional()
modrinthDepends.embedded()

curseDepends.required("fabric-api")
curseDepends.optional()
curseDepends.embedded()

displayName.set("${display.name} ${libs.versions.mod.get()} for ${display.loader} ${display.version}")

artifact.set(tasks.remapJar)
addAdditionalFile(tasks.remapSourcesJar)

changelog.set(file("CHANGELOG.md"))
}
20 changes: 16 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
[versions]
maven-group = "net.krlite"
maven-group = "band.kessokuteatime"
archives-name = "itfollows"
mod = "1.0.2"
mod = "1.1.0"
loader = "fabric"

minecraft = "1.20"
yarn = "1.20+build.1"
fabric-loader = "0.15.7"
fabric-loader = "0.15.10"
fabric-api = "0.83.0+1.20"
fabric-loom = "1.5-SNAPSHOT"
fabric-loom = "1.6-SNAPSHOT"
modpublisher = "2.1.0"

# id
id-modrinth = "pLCpicf0"
id-curseforge = "998444"

# display
display-name = "It Follows!"
display-loader = "Fabric"
display-version = "1.20.x"

[libraries]
minecraft = { group = "com.mojang", name = "minecraft", version.ref = "minecraft" }
Expand All @@ -17,6 +28,7 @@ fabric-api = { group = "net.fabricmc.fabric-api", name = "fabric-api", version.r

[plugins]
fabric-loom = { id = "fabric-loom", version.ref = "fabric-loom" }
modpublisher = { id = "com.hypherionmc.modutils.modpublisher", version.ref = "modpublisher" }

[bundles]
fabric = ["fabric-loader", "fabric-api"]
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pluginManagement {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
maven { url = uri("https://maven.firstdark.dev/releases") } // modpublisher
mavenCentral()
gradlePluginPortal()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package net.krlite.itfollows;
package band.kessokuteatime.itfollows;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.ModInitializer;
import net.krlite.itfollows.mixin.ClickableWidgetAccessor;
import band.kessokuteatime.itfollows.mixin.ClickableWidgetAccessor;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.widget.ClickableWidget;
import net.minecraft.client.util.Window;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.krlite.itfollows.mixin;
package band.kessokuteatime.itfollows.mixin;

import net.minecraft.client.gui.widget.ClickableWidget;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.krlite.itfollows.mixin;
package band.kessokuteatime.itfollows.mixin;

import net.krlite.itfollows.ItFollows;
import band.kessokuteatime.itfollows.ItFollows;
import net.minecraft.client.gui.widget.CyclingButtonWidget;
import net.minecraft.client.gui.widget.PressableWidget;
import net.minecraft.text.Text;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.krlite.itfollows.mixin;
package band.kessokuteatime.itfollows.mixin;

import net.krlite.itfollows.ItFollows;
import band.kessokuteatime.itfollows.ItFollows;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.Mouse;
import net.minecraft.client.util.InputUtil;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.krlite.itfollows.mixin;
package band.kessokuteatime.itfollows.mixin;

import net.krlite.itfollows.ItFollows;
import band.kessokuteatime.itfollows.ItFollows;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.widget.ClickableWidget;
import net.minecraft.client.gui.widget.PressableWidget;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.krlite.itfollows.mixin;
package band.kessokuteatime.itfollows.mixin;

import net.krlite.itfollows.ItFollows;
import band.kessokuteatime.itfollows.ItFollows;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.option.GameOptionsScreen;
import net.minecraft.client.gui.screen.option.VideoOptionsScreen;
Expand Down
9 changes: 5 additions & 4 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
"id": "itfollows",
"version": "${version}",

"name": "It Follows!",
"name": "${display.name}",
"description": "Let the cursor follow the 'GUI Scale' button so they won't separate!",
"authors": [
"Kessoku Tea Time",
"KrLite"
],
"contact": {
"homepage": "https://modrinth.com/mod/it-follows!",
"sources": "https://github.com/KrLite/Mod.It-Follows-Exclamation",
"issues": "https://github.com/KrLite/Mod.It-Follows-Exclamation/issues"
"sources": "https://github.com/KessokuTeaTime/It-Follows-Exclamation",
"issues": "https://github.com/KessokuTeaTime/It-Follows-Exclamation/issues"
},

"license": "GPL-3.0",
Expand All @@ -20,7 +21,7 @@
"environment": "client",
"entrypoints": {
"client": [
"net.krlite.itfollows.ItFollows"
"band.kessokuteatime.itfollows.ItFollows"
]
},
"mixins": [
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/itfollows.mixins.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"required": true,
"minVersion": "0.8",
"package": "net.krlite.itfollows.mixin",
"package": "band.kessokuteatime.itfollows.mixin",
"compatibilityLevel": "JAVA_17",
"mixins": [
],
Expand Down

0 comments on commit afcc58f

Please sign in to comment.