1
0
mirror of https://github.com/chylex/Better-Controls.git synced 2025-05-08 01:34:05 +02:00

Update build.gradle & mod description

This commit is contained in:
chylex 2021-12-02 08:28:29 +01:00
parent 449ee5b435
commit 9922828f09
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548
4 changed files with 58 additions and 19 deletions
Fabric/src/main/resources
Forge/src/main/resources/META-INF
build.gradle.ktsgradle.properties

View File

@ -1,18 +1,20 @@
{
"schemaVersion": 1,
"id": "bettercontrols",
"version": "${version}",
"name": "${name}",
"description": "Adds many powerful key bindings and options to control your movement.\nThe features complement vanilla mechanics without giving unfair advantages, so server use should be fine.",
"icon": "assets/bettercontrols/icon.png",
"license": "MPL-2.0",
"description": "${description}",
"version": "${version}",
"license": "${license}",
"icon": "assets/bettercontrols/icon.png",
"authors": [
"${author}"
],
"authors": [ "chylex" ],
"contact": {
"homepage": "",
"sources": "https://github.com/chylex/Better-Controls",
"issues": "https://github.com/chylex/Better-Controls/issues"
"issues": "${issuesURL}",
"sources": "${sourcesURL}"
},
"environment": "client",

View File

@ -1,19 +1,16 @@
modLoader = "javafml"
loaderVersion = "[37,)"
authors = "chylex"
license = "MPL-2.0"
issueTrackerURL = "https://github.com/chylex/Better-Controls/issues"
authors = "${author}"
license = "${license}"
issueTrackerURL = "${issuesURL}"
[[mods]]
modId = "bettercontrols"
version = "${version}"
displayName = "${name}"
description = "${description}"
logoFile = "icon.png"
description = '''
Adds many powerful key bindings and options to control your movement.
The features complement vanilla mechanics without giving unfair advantages, so server use should be fine.
'''
[[dependencies.bettercontrols]]
modId = "minecraft"

View File

@ -4,8 +4,13 @@ import java.util.Date
val modId: String by project
val modName: String by project
val modDescription: String by project
val modAuthor: String by project
val modVersion: String by project
val modLicense: String by project
val modSourcesURL: String by project
val modIssuesURL: String by project
val minecraftVersion: String by project
val mixinVersion: String by project
@ -26,7 +31,16 @@ plugins {
idea {
module {
excludeDirs.add(project.file("run"))
excludeDirs.add(file("gradle"))
excludeDirs.add(file("run"))
if (findProject(":Forge") == null) {
excludeDirs.add(file("Forge"))
}
if (findProject(":Fabric") == null) {
excludeDirs.add(file("Fabric"))
}
}
}
@ -90,7 +104,12 @@ subprojects {
from(rootProject.sourceSets.main.get().resources)
inputs.property("name", modName)
inputs.property("description", modDescription)
inputs.property("version", modVersion)
inputs.property("author", modAuthor)
inputs.property("license", modLicense)
inputs.property("sourcesURL", modSourcesURL)
inputs.property("issuesURL", modIssuesURL)
}
tasks.jar {
@ -113,17 +132,34 @@ subprojects {
}
}
tasks.register("setupIdea") {
group = "mod"
dependsOn(tasks.findByName("decompile"))
val forge = findProject(":Forge")
if (forge != null) {
dependsOn(forge.tasks.getByName("genIntellijRuns"))
}
val fabric = findProject(":Fabric")
if (fabric != null) {
dependsOn(fabric.tasks.getByName("genSources"))
}
}
val copyJars = tasks.register<Copy>("copyJars") {
group = "build"
duplicatesStrategy = EXCLUDE
for (subproject in subprojects) {
dependsOn(subproject.tasks.build)
dependsOn(subproject.tasks.assemble)
from(subproject.base.libsDirectory.file("${subproject.base.archivesName.get()}-$jarVersion.jar"))
}
into(file("${project.buildDir}/dist"))
}
tasks.build {
tasks.assemble {
finalizedBy(copyJars)
}

View File

@ -1,8 +1,12 @@
# Mod
modId=bettercontrols
modName=Better Controls
modDescription=Adds many powerful key bindings and options to control your movement.\\n\\nThe features complement vanilla mechanics without giving unfair advantages, so server use should be fine.
modAuthor=chylex
modVersion=1.2.1
modLicense=MPL-2.0
modSourcesURL=https://github.com/chylex/Better-Controls
modIssuesURL=https://github.com/chylex/Better-Controls/issues
# Dependencies
minecraftVersion=1.17.1