generated from KessokuTeaTime/Example-Mod
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 82afd1d
Showing
20 changed files
with
1,306 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# gradle | ||
|
||
.gradle/ | ||
build/ | ||
out/ | ||
classes/ | ||
|
||
# eclipse | ||
|
||
*.launch | ||
|
||
# idea | ||
|
||
.idea/ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
|
||
# vscode | ||
|
||
.settings/ | ||
.vscode/ | ||
bin/ | ||
.classpath | ||
.project | ||
|
||
# macos | ||
|
||
*.DS_Store | ||
|
||
# fabric | ||
|
||
run/ | ||
|
||
# java | ||
|
||
hs_err_*.log | ||
replay_*.log | ||
*.hprof | ||
*.jfr |
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
### <p align=right>[`→` CurseForge](https://www.curseforge.com/minecraft/mc-mods/modid) [`→` Modrinth](https://modrinth.com/mod/modid)</p> | ||
|
||
# Example Mod | ||
|
||
This is an example mod. | ||
|
||
## License | ||
|
||
This repository is licensed under the **[GNU General Public License v3.](LICENSE)** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
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.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) | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
minecraft(libs.minecraft) | ||
mappings(libs.yarn) | ||
modImplementation(libs.bundles.fabric) | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
|
||
withSourcesJar() | ||
} | ||
|
||
tasks { | ||
processResources { | ||
filesMatching("fabric.mod.json") { | ||
expand(mapOf( | ||
"version" to libs.versions.mod.get(), | ||
"display" to display | ||
)) | ||
} | ||
} | ||
|
||
jar { | ||
from("LICENSE") | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("mavenJava") { | ||
from(components["java"]) | ||
} | ||
} | ||
|
||
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")) | ||
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")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[versions] | ||
maven-group = "band.kessokuteatime" | ||
archives-name = "modid" | ||
mod = "1.0.0" | ||
loader = "fabric" | ||
|
||
minecraft = "1.20" | ||
yarn = "1.20+build.1" | ||
fabric-loader = "0.15.10" | ||
fabric-api = "0.83.0+1.20" | ||
fabric-loom = "1.6-SNAPSHOT" | ||
modpublisher = "2.1.0" | ||
|
||
# id | ||
id-modrinth = "id" | ||
id-curseforge = "id" | ||
|
||
# display | ||
display-name = "Example" | ||
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" } | ||
fabric-loader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabric-loader" } | ||
fabric-api = { group = "net.fabricmc.fabric-api", name = "fabric-api", version.ref = "fabric-api" } | ||
|
||
[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"] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.