-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
117fb7d
commit c37ce66
Showing
14 changed files
with
727 additions
and
668 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,12 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# Linux start script should use lf | ||
/gradlew text eol=lf | ||
|
||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf | ||
|
||
# Binary files should be left untouched | ||
*.jar binary | ||
|
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
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,104 @@ | ||
import net.fabricmc.loom.api.LoomGradleExtensionAPI | ||
import org.gradle.plugins.ide.idea.model.IdeaModel | ||
|
||
plugins { | ||
id("architectury-plugin") version "3.4-SNAPSHOT" | ||
id("dev.architectury.loom") version "1.7-SNAPSHOT" apply false | ||
} | ||
|
||
allprojects { | ||
group = "band.kessokuteatime.kessokulib" | ||
apply<IdeaPlugin>() | ||
apply<JavaLibraryPlugin>() | ||
|
||
repositories { | ||
maven { | ||
name = "NeoForged" | ||
url = uri("https://maven.neoforged.net/releases") | ||
} | ||
maven { | ||
name = "Architectury" | ||
url = uri("https://maven.architectury.dev/") | ||
} | ||
} | ||
|
||
configure<IdeaModel> { | ||
module { | ||
isDownloadJavadoc = true | ||
isDownloadSources = true | ||
} | ||
} | ||
tasks.withType<JavaCompile> { | ||
options.encoding = "UTF-8" | ||
sourceCompatibility = JavaVersion.VERSION_21.toString() | ||
targetCompatibility = JavaVersion.VERSION_21.toString() | ||
} | ||
|
||
tasks.withType<ProcessResources> { | ||
inputs.property("version", project.version) | ||
filesMatching("fabric.mod.json") { | ||
expand(mutableMapOf("version" to project.version)) | ||
} | ||
filesMatching("META-INF/neoforge.mods.toml") { | ||
expand(mutableMapOf("version" to project.version)) | ||
} | ||
} | ||
} | ||
|
||
|
||
fun getNeoModules(): List<Project> { | ||
return subprojects.filter { | ||
it.name.contains("neo") && it != project(":neo") | ||
} | ||
} | ||
|
||
extra["getNeoModules"] = { getNeoModules() } | ||
|
||
fun getFabricModules(): List<Project> { | ||
return subprojects.filter { | ||
it.name.contains("fabric") && it != project(":fabric") | ||
} | ||
} | ||
|
||
extra["getFabricModules"] = { getFabricModules() } | ||
|
||
subprojects { | ||
apply(plugin = "dev.architectury.loom") | ||
apply<BasePlugin>() | ||
if (!project.parent?.name.equals("kessoku-lib")) { | ||
apply("architectury-plugin") | ||
} | ||
extensions.extraProperties["getNeoModules"] = { getNeoModules() } | ||
extensions.getByType(BasePluginExtension::class.java).archivesName.set(rootProject.name) | ||
version = | ||
rootProject.libs.versions.mod.get() + "+" + (if (project.name == "neo") "neoforge" else project.name) + "." + rootProject.libs.versions.minecraft.get() | ||
dependencies { | ||
val loom = project.extensions.getByType<LoomGradleExtensionAPI>() | ||
"minecraft"(rootProject.libs.minecraft) | ||
"mappings"( | ||
loom.layered { | ||
variantOf(rootProject.libs.yarn) { classifier("v2") } | ||
rootProject.libs.yarn.patch | ||
} | ||
) | ||
} | ||
} | ||
|
||
val buildModules = tasks.register("buildModules") { | ||
subprojects.forEach { p -> | ||
if (p.name != "neo" && p.name != "fabric" && p.name != "common") { | ||
val buildTask = p.tasks.getByName("build") | ||
buildTask.actions.forEach { it.execute(buildTask) } | ||
} | ||
} | ||
} | ||
|
||
val bundleModules = tasks.register("bundleModules") { | ||
val neoBuild = project(":neo").tasks.getByName("build") | ||
neoBuild.actions.forEach { it.execute(neoBuild) } | ||
val fabBuild = project(":fabric").tasks.getByName("build") | ||
fabBuild.actions.forEach { it.execute(fabBuild) } | ||
} | ||
|
||
tasks.getByName("bundleModules").dependsOn(buildModules.name) | ||
tasks.getByName("build").dependsOn(buildModules.name) |
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,5 @@ | ||
dependencies { | ||
(rootProject.extra["getFabricModules"] as () -> List<Project>)().forEach { | ||
include(it) | ||
} | ||
} |
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,21 @@ | ||
{ | ||
"schemaVersion": 1, | ||
"id": "kessokulib", | ||
"version": "${version}", | ||
"name": "Kessoku Lib", | ||
"description": "This is an example description! Tell everyone what your mod is about!", | ||
"authors": [ | ||
"Kessoku Tea Time" | ||
], | ||
"contact": { | ||
"homepage": "https://github.com/KessokuTeaTime/KessokuLib", | ||
"sources": "https://github.com/KessokuTeaTime/KessokuLib", | ||
"issues": "https://github.com/KessokuTeaTime/KessokuLib/issues" | ||
}, | ||
"license": "LGPL-3.0-only", | ||
"icon": "assets/kessokulib/icon.png", | ||
"environment": "*", | ||
"depends": { | ||
"minecraft": ">=1.21- <1.21.1-" | ||
} | ||
} |
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,18 @@ | ||
[versions] | ||
mod = "0.1.0" | ||
minecraft = "1.21" | ||
yarn = "1.21+build.9" | ||
yarn-mappings-patch-neoforge = "1.21+build.4" | ||
neo = "21.0.139-beta" | ||
fabric-loader = "0.16.0" | ||
|
||
fabric-api = "0.100.7+1.21" | ||
architectury-api = "13.0.6" | ||
[libraries] | ||
minecraft = { group = "com.mojang", name = "minecraft", version.ref = "minecraft" } | ||
yarn = { group = "net.fabricmc", name = "yarn", version.ref = "yarn" } | ||
yarn-patch = { group = "dev.architectury", name = "yarn-mappings-patch-neoforge", version.ref = "yarn-mappings-patch-neoforge" } | ||
|
||
neo = { group = "net.neoforged", name = "neoforge", version.ref = "neo" } | ||
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" } |
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 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.