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 c92fbf0 commit a11122a
Show file tree
Hide file tree
Showing 17 changed files with 118 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)**
6 changes: 3 additions & 3 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/ive-spoken)</p>
### <p align=right>[`` CurseForge](https://www.curseforge.com/minecraft/mc-mods/ive-spoken)&ensp;[`` Modrinth](https://modrinth.com/mod/ive-spoken)</p>

# I've Spoken

**I've Spoken** pops a RPG-like dialog on top of one's name when he or she speaks, and lasts for about 5 seconds before vanishing (configurable).
**I've Spoken** pops an RPG-like dialog on top of one's name when he or she speaks, and lasts for about 5 seconds before vanishing (configurable).

It's just something like this:

![I've spoken.](https://github.com/KrLite/Mod.Ive-Spoken/blob/artwork/content/spoken.png)
![I've spoken.](https://github.com/KessokuTeaTime/Ive-Spoken/blob/artwork/content/spoken.png)

The content will be truncated if too long (configurable).

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 @@ -38,10 +51,11 @@ java {

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 @@ -60,3 +74,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("both")

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,17 +1,28 @@
[versions]
maven-group = "net.krlite"
maven-group = "band.kessokuteatime"
archives-name = "ivespoken"
mod = "2.0.3-alpha.1"
mod = "2.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"

cloth-config = "11.1.118"
modmenu = "7.0.1"

# id
id-modrinth = "OidSa416"
id-curseforge = "998412"

# display
display-name = "I've Spoken"
display-loader = "Fabric"
display-version = "1.20.x"

[libraries]
minecraft = { group = "com.mojang", name = "minecraft", version.ref = "minecraft" }
yarn = { group = "net.fabricmc", name = "yarn", version.ref = "yarn" }
Expand All @@ -23,6 +34,7 @@ modmenu = { group = "com.terraformersmc", name = "modmenu", version.ref = "modme

[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,11 +1,11 @@
package net.krlite.ivespoken;
package band.kessokuteatime.ivespoken;

import com.google.common.collect.ImmutableMap;
import me.shedaniel.autoconfig.AutoConfig;
import me.shedaniel.autoconfig.ConfigHolder;
import me.shedaniel.autoconfig.serializer.Toml4jConfigSerializer;
import net.fabricmc.api.ClientModInitializer;
import net.krlite.ivespoken.config.IveSpokenConfig;
import band.kessokuteatime.ivespoken.config.IveSpokenConfig;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.network.AbstractClientPlayerEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.krlite.ivespoken;
package band.kessokuteatime.ivespoken;

import net.minecraft.text.Text;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.krlite.ivespoken.config;
package band.kessokuteatime.ivespoken.config;

import me.shedaniel.autoconfig.ConfigData;
import me.shedaniel.autoconfig.annotation.Config;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.krlite.ivespoken.config;
package band.kessokuteatime.ivespoken.config;

import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import me.shedaniel.autoconfig.AutoConfig;
import net.krlite.ivespoken.IveSpoken;
import band.kessokuteatime.ivespoken.IveSpoken;

public class IveSpokenModMenuIntegration implements ModMenuApi {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.krlite.ivespoken.mixin;
package band.kessokuteatime.ivespoken.mixin;

import net.krlite.ivespoken.IveSpoken;
import band.kessokuteatime.ivespoken.IveSpoken;
import net.minecraft.client.gui.hud.ChatHud;
import net.minecraft.client.gui.hud.MessageIndicator;
import net.minecraft.network.message.MessageSignatureData;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.krlite.ivespoken.mixin;
package band.kessokuteatime.ivespoken.mixin;

import net.krlite.ivespoken.IveSpoken;
import band.kessokuteatime.ivespoken.IveSpoken;
import net.minecraft.client.network.AbstractClientPlayerEntity;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.EntityRenderer;
Expand Down
11 changes: 6 additions & 5 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
"id": "ivespoken",
"version": "${version}",

"name": "I've Spoken",
"name": "${display.name}",
"description": "Displays RPG-like dialogs above players' names. I've spoken.",
"authors": [
"Kessoku Tea Time",
"KrLite"
],
"contact": {
"homepage": "https://modrinth.com/mod/ive-spoken",
"sources": "https://github.com/KrLite/Mod.Ive-Spoken",
"issues": "https://github.com/KrLite/Mod.Ive-Spoken/issues"
"sources": "https://github.com/KessokuTeaTime/Ive-Spoken",
"issues": "https://github.com/KessokuTeaTime/Ive-Spoken/issues"
},

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

0 comments on commit a11122a

Please sign in to comment.