Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
KrLite authored May 1, 2024
0 parents commit 82afd1d
Show file tree
Hide file tree
Showing 20 changed files with 1,306 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
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
40 changes: 40 additions & 0 deletions .gitignore
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 added CHANGELOG.md
Empty file.
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions README.md
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)&ensp;[`` 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)**
101 changes: 101 additions & 0 deletions build.gradle.kts
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"))
}
34 changes: 34 additions & 0 deletions gradle/libs.versions.toml
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 added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
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
Loading

0 comments on commit 82afd1d

Please sign in to comment.