Skip to content

Commit

Permalink
Sync with Framework, close #3
Browse files Browse the repository at this point in the history
  • Loading branch information
NotRyken committed Sep 21, 2024
1 parent de70b3c commit 61a2793
Show file tree
Hide file tree
Showing 18 changed files with 351 additions and 241 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Builds the project on Linux and Windows as a partial defence against bad commits
# Builds the project on Linux and Windows as a partial defense against bad commits
name: Check Build

on:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Builds the project and publishes the artifacts to GitHub and Modrinth
# Requires GITHUB_TOKEN to have write permissions; if not, replace it with a custom token
# Requires a Modrinth PAT MODRINTH_TOKEN
# Builds the project and publishes the artifacts to GitHub, Modrinth and CurseForge
# Modrinth publishing requires a Modrinth PAT MODRINTH_TOKEN
# Will skip without error if not present
# CurseForge publishing requires a CurseForge API token CURSEFORGE_TOKEN
# Will skip without error if not present
name: Release

on: [workflow_dispatch]
on:
workflow_dispatch:

permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Synchronizes the repo's labels with labels.yml
# Synchronizes the repo's labels with a centralized labels.yml
# Requires GITHUB_TOKEN to have write permissions; if not, replace it with a custom token
name: Sync Labels

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ run/
runs/
out/
classes/
.eclipse/

# IDEA
.idea/
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Adds a potency indicator and countdown overlay to status effect icons.
[![Latest Minecraft](https://img.shields.io/modrinth/game-versions/JIUF2Wb5?label=Latest%20Minecraft&color=%2300AF5C&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA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tL+s794Rr3h0kRdb2bxBH5uyVRD5D0MXCp+8O+IXR1wGV1cT7ARz4DQvzhLWCBryGGZ6HzZ4ClvjvNW+T9ZMj/47M8af0wK8Mjm13n38eRSmI7GvOfuMx2ItYE3NJG4jjd4sylsdcEHWCDG1uyyTXEDb4SlYC/AW0t3IQpiA17AAAAAElFTkSuQmCC)](https://modrinth.com/mod/JIUF2Wb5/versions)

[![Loader](https://img.shields.io/badge/Available%20for-Fabric-dbd0b4?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAcBAMAAACNPbLgAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TpX5UHMwgIpihOtlFRRxLFYtgobQVWnUwufQLmjQkKS6OgmvBwY/FqoOLs64OroIg+AHi6uKk6CIl/i8ptIj14Lgf7+497t4BQr3MNKsrAmi6bSZjUSmTXZUCr+iHiADG0Cszy4inFtPoOL7u4ePrXZhndT735xhQcxYDfBJxhBmmTbxBPLtpG5z3iUVWlFXic+JJky5I/Mh1xeM3zgWXBZ4pmunkPLFILBXaWGljVjQ14hnikKrplC9kPFY5b3HWylXWvCd/YTCnr6S4TnMUMSwhjgQkKKiihDJshGnVSbGQpP1oB/+I60+QSyFXCYwcC6hAg+z6wf/gd7dWfnrKSwpGge4Xx/kYBwK7QKPmON/HjtM4AfzPwJXe8lfqwNwn6bWWFjoCBreBi+uWpuwBlzvA8JMhm7Ir+WkK+TzwfkbflAWGboG+Na+35j5OH4A0dbV8AxwcAhMFyl7v8O6e9t7+PdPs7wd+dXKrd9SjeQAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAAd0SU1FB+cLFAcgIbOcUjoAAAAbUExURQAAAB0tQTg0KoB6bZqSfq6mlLyynMa8pdvQtJRJT6UAAAABdFJOUwBA5thmAAAAAWJLR0QB/wIt3gAAAF5JREFUGNN10FENwCAMhOFqOQuzMAtYOAtYqGw6mkEvhL59yR9Ca5YDqyOC465eKYqQm6LoCkVwnwQOBYKde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IGXcGIb9aYC5iurKCDCgXExS37yLGcMBdfZ8oGPwP0phLrr614yrZToj2+Nx6zjwpIAUmxYBzMCf/zF2SyGgfDjlgJgZ7DYZbJ9kO0PHoI4FzprjR+GpOLhy5R60ckLN+3bpAK/TxovXC8Xo7GUTgNHqJlifUcokW+VSqo9QmqQWkIrpWpNWau9z9M3XbFqySgeNpcrjsIjEwi88aIbUbPR7shGQZqNaTKJsjxlF5XNo5xB9+Yxzwv1lsMD3BCz6fAUwwBAC0rWmUDkwwMMOmK/Z9O0pGtH+sJaj4RsuNTqDv5un2WhymZKEt90C7+rqLCPJajI+W7yv62sytEdBNgyQq/XrV60n3kXx5yuJvM0DJ9RlYFeii3lgkNbATP3ssMErPit87Od9MYaiE00yM9qsUGcoOm1TazLnjPuDmL9tMeRzHhUwkfLgS+hSg+m9+nspx8sILl7RU9iLtUIXF+R9dVEbnDKAkAbRJmp/ZCJAVC9+qa8Mttv4xb4wrnOZAOrhEr2HB5J7+8wKF/D8KXaZt9UvVYn6BKEO4lnhmQnTASaD44Y0sTfxWspQqxH6cgU4ERwXpInS/QBCHsTJ6X2tIoZjzI8Of8O7lqUCzAQuY8hst8+SjMGsAHngMoLMJ0AzcGkhTQKOYDf9iQF6YCM6O3RfxYsTMBu4CSFz9V8W1c3wGDr9rxlAWsTx2bFs4HT7l8Gc/pcFhV1U9sOJZhM6fccMIPaGfbmAU3U+78Ygxb74vM4cwA0cXA6WvJxkcgB5PxwDtMB+kw/8mQFugGaTgNE1zbBA70sWkMnh6PDbYTHt4OK4auGRvyy++UjpEQbRL6NaeIRjtj6ZPyYgU8Pl68EBWXhwHJCFC5cBZOHDTQD58MAlJkIMv9SE+/yXFlie7v7/ActvzVytpHElAAAAAElFTkSuQmCC)](https://quiltmc.org/)
[![Loader](https://img.shields.io/badge/Available%20for-NeoForge-f16436?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAABhGlDQ1BJQ0MgcHJvZmlsZQA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cy/uszAu83X2M5tMc90Nc/a2c/a2tFwMNKgjNNxMNRyMNR5NtSMatS6t9TMytXg39d0L9nCu9nl5NuWd9zY2N3Iw96+tt+wnuCCNODNzeKHNeLu7eaMN+by8efZ0+ja2Ozg3O/o5/Dn5PXu7Pn09P///+RBO4EAAAAHdFJOUwAQQEBwgJ+al5Z5AAAAAWJLR0Sjx9rvGgAAAkNJREFUGBkFwT9vG3UAANB3dz/7bNfnxO61UkAhiSBCFGWhHcqGxMrKxtfgMyCVL8HYHRbKyNCJobJYIEoqkWIwSWPHzdkX3x/ei0QxAAAAmjaIHwIAAGBeh070hN0+YFkAAD/HId/7gmEMuK0BgDezIB3OXh12M+Y/8uXe6u+XfP4e1vNsshGEuFrM0pazf/lncn11xVUf5eIuaiRZ3bSHqtvbH16Pq+bowXBxHnZOf/+UsDPwpozF404dehcXUed4pLy6Ko2OO9HFBaqyFfT2/5vlyUvj429+evH62tKTr/z50tcsiq2gLiqVxGa5bZN7I1XSbpebBNJtJMnCoLApmnxWHizDx/nuOJr4tfgkf0iazcoA4GC0eTDZT5XDZHN0A8pVIwB46t1ePog1w8vZI1NYFZUAOPYRCTC6xwYgAHr6ALroaYAAkvZE3m7LknekaSc6MY1qCFWFJl7T/JX2GliWh8laL6oTdRWvC7T16anVs+c2BZ4/Wzk9zYY7Q7frgHJVt481d21jVUqzpr1r9vwRda4RsCrWVa66aVvLa+OsbW92cy9CH5Ju+mGxTToXZx8k+dNBOp4Mw8H7+80vZ22ImFcBxObq8Bkp3L+vnsuAAGDK49G3C7vf3/wGgBgAAAAgADJTHo2+a8TWUzKAoCnLy1GXwNtJUQmDtwHc3fSGRMPeyfnlUQ7KO9BNweV5fjTdBAwmXSAAAehOBggYdvpAkgBAf5wiiuPdukliAAA0dZwsmkg8AAAAQNEAAAAA+B8LzexYIpdh2QAAAABJRU5ErkJggg==)](https://neoforged.net/)

[![Download on Modrinth](https://img.shields.io/modrinth/dt/JIUF2Wb5?label=Download%20on%20Modrinth&logo=modrinth&logoColor=%2300AF5C)](https://modrinth.com/mod/JIUF2Wb5)
Expand Down Expand Up @@ -54,7 +53,7 @@ by [magicus](https://github.com/magicus)

### License

EffectTimerPlus is licensed [LGPL-3.0-only](https://www.gnu.org/licenses/lgpl-3.0.html) due to being a technical derivation of Status Effect Timer.
EffectTimerPlus inherits the [LGPL-3.0-only](https://www.gnu.org/licenses/lgpl-3.0.html) license from Status Effect Timer.

### Contact

Expand Down
122 changes: 7 additions & 115 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
plugins {
id("java")
id("java-library")
id("idea")
id("maven-publish")
id("org.jetbrains.gradle.plugin.idea-ext") version("${ideaext_version}") // Required for NeoGradle
id("fabric-loom") version("${loom_version}") apply(false)
id("net.neoforged.moddev") version("${moddev_version}") apply(false)
id("com.modrinth.minotaur") version("${minotaur_version}")
id("net.darkhax.curseforgegradle") version("${curseforgegradle_version}")
id("com.github.breadmoirai.github-release") version("${githubrelease_version}")
Expand All @@ -14,114 +11,14 @@ subprojects {
version = mod_version
group = mod_group

apply(plugin: "java")
apply(plugin: "java-library")
apply(plugin: "idea")
apply(plugin: "maven-publish")

if (project.name != "common") {
// Publishing
if (name != "common") {
apply(plugin: "com.modrinth.minotaur")
apply(plugin: "net.darkhax.curseforgegradle")
apply(plugin: "com.github.breadmoirai.github-release")
apply(plugin: "org.ajoberstar.grgit.service")
}

java.toolchain.languageVersion = JavaLanguageVersion.of(Integer.valueOf(java_version))

jar {
from(rootProject.file("LICENSE")) {
rename { "${it}_${mod_name}" }
}
manifest {
attributes([
"Specification-Title" : mod_name,
"Specification-Vendor" : mod_owner,
"Specification-Version" : project.jar.archiveVersion,
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : mod_owner,
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"Timestamp" : System.currentTimeMillis(),
"Built-On-Java" : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
"Built-On-Minecraft" : minecraft_version
])
}
}
java.withSourcesJar()
sourcesJar {
from(rootProject.file("LICENSE")) {
rename { "${it}_${mod_name}" }
}
}

repositories {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
maven {
name "Xander"
url "https://maven.isxander.dev/releases"
}
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.getRelease().set(Integer.valueOf(java_version))
}

processResources {
def expandProps = [
// Mod info
"project_group": project.group,
"mod_version": mod_version,
"mod_group": mod_group,
"mod_id": mod_id,
"mod_name": mod_name,
"mod_description": mod_description,
"mod_icon": "assets/" + mod_id + "/icon.png",
"mod_owner": mod_owner,
"mod_authors_list": asJsonList(mod_authors),
"mod_contributors_list": asJsonList(mod_contributors),
"mod_authors_string": mod_authors.replace(",", ", "),
"mod_contributors_string": mod_contributors.replace(",", ", "),
"mod_license": mod_license,
"mod_environment": mod_environment,
// Java
"java_version": java_version,
"java_versions_fabric_list": asJsonList(java_versions_fabric),
"java_versions_neoforge": java_versions_neoforge,
// Minecraft
"minecraft_versions_fabric_list": asJsonList(minecraft_versions_fabric),
"minecraft_versions_neoforge": minecraft_versions_neoforge,
// Fabric
"fabric_loader_versions_list": asJsonList(fabric_loader_versions),
"fabric_api_versions_list": asJsonList(fabric_api_versions),
// NeoForge
"neoforge_loader_versions": neoforge_loader_versions,
"neoforge_versions": neoforge_versions,
// Dependencies
"yacl_versions_fabric_list": asJsonList(yacl_versions_fabric),
"yacl_versions_neoforge": yacl_versions_neoforge,
"modmenu_versions_fabric_list": asJsonList(modmenu_versions),
// Links
"homepage_url": homepage_url,
"sources_url": sources_url,
"issues_url": issues_url,
"contact_url": contact_url
]

filesMatching(["pack.mcmeta", "*.mod.json", "META-INF/*mods.toml", "*.mixins.json", "assets/"+mod_id+"/lang/*.json"]) {
expand expandProps
}
inputs.properties(expandProps)
}

tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false
}

afterEvaluate {
if (name != "common") {
afterEvaluate {
modrinth {
token = System.getenv().MODRINTH_TOKEN ? System.getenv().MODRINTH_TOKEN : "empty"
projectId = modrinth_id
Expand Down Expand Up @@ -157,8 +54,7 @@ subprojects {
tasks.modrinthSyncBody.onlyIf { System.getenv().MODRINTH_TOKEN }

task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {
apiToken = System.getenv().CURSEFORGE_TOKEN ? System.getenv().CURSEFORGE_TOKEN : ""
if (apiToken.isBlank()) return
apiToken = System.getenv().CURSEFORGE_TOKEN ? System.getenv().CURSEFORGE_TOKEN : "empty"

disableVersionDetection()
String module = project.name
Expand Down Expand Up @@ -213,10 +109,6 @@ subprojects {
}
}

static asJsonList(String versions) {
return versions.split(",").collect { "\"$it\"" }.join(',')
}

static String capsLoader(String loader) {
switch(loader) {
case "fabric": return "Fabric"
Expand Down
3 changes: 3 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("groovy-gradle-plugin")
}
Loading

0 comments on commit 61a2793

Please sign in to comment.