mirror of
https://github.com/chylex/Better-Controls.git
synced 2024-11-25 01:42:45 +01:00
Compare commits
No commits in common. "476689deb918ac33f3885bbf50af807229cadcd9" and "73a6571f205a3b145e6bd75e977eb90a042332c8" have entirely different histories.
476689deb9
...
73a6571f20
BIN
Fabric/src/main/resources/assets/bettercontrols/icon.png
Normal file
BIN
Fabric/src/main/resources/assets/bettercontrols/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
@ -6,7 +6,7 @@
|
|||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"license": "${license}",
|
"license": "${license}",
|
||||||
|
|
||||||
"icon": "assets/${id}/logo.png",
|
"icon": "assets/bettercontrols/icon.png",
|
||||||
|
|
||||||
"authors": [
|
"authors": [
|
||||||
"${author}"
|
"${author}"
|
||||||
|
@ -11,7 +11,7 @@ displayURL = "${sourcesURL}"
|
|||||||
description = "${description}"
|
description = "${description}"
|
||||||
authors = "${author}"
|
authors = "${author}"
|
||||||
version = "${version}"
|
version = "${version}"
|
||||||
logoFile = "assets/${id}/logo.png"
|
logoFile = "icon.png"
|
||||||
|
|
||||||
[[mixins]]
|
[[mixins]]
|
||||||
config = "${id}.mixins.json"
|
config = "${id}.mixins.json"
|
||||||
|
BIN
NeoForge/src/main/resources/icon.png
Normal file
BIN
NeoForge/src/main/resources/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
117
build.gradle.kts
117
build.gradle.kts
@ -1,6 +1,6 @@
|
|||||||
@file:Suppress("ConvertLambdaToReference")
|
@file:Suppress("ConvertLambdaToReference")
|
||||||
|
|
||||||
import org.gradle.jvm.tasks.Jar
|
import org.gradle.api.file.DuplicatesStrategy.EXCLUDE
|
||||||
|
|
||||||
val modId: String by project
|
val modId: String by project
|
||||||
val modName: String by project
|
val modName: String by project
|
||||||
@ -50,16 +50,6 @@ base {
|
|||||||
archivesName.set("$modNameStripped-Common")
|
archivesName.set("$modNameStripped-Common")
|
||||||
}
|
}
|
||||||
|
|
||||||
loom {
|
|
||||||
runs {
|
|
||||||
named("client") {
|
|
||||||
ideConfigGenerated(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
findByName("server")?.let(::remove)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft("com.mojang:minecraft:$minecraftVersion")
|
minecraft("com.mojang:minecraft:$minecraftVersion")
|
||||||
mappings(loom.officialMojangMappings())
|
mappings(loom.officialMojangMappings())
|
||||||
@ -94,24 +84,6 @@ allprojects {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation("org.jetbrains:annotations:24.1.0")
|
implementation("org.jetbrains:annotations:24.1.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<ProcessResources> {
|
|
||||||
inputs.property("id", modId)
|
|
||||||
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)
|
|
||||||
inputs.property("minimumMinecraftVersion", minimumMinecraftVersion)
|
|
||||||
inputs.property("minimumNeoForgeVersion", minimumNeoForgeVersion)
|
|
||||||
inputs.property("minimumFabricVersion", minimumFabricVersion)
|
|
||||||
|
|
||||||
from(rootProject.file("logo.png")) {
|
|
||||||
into("assets/$modId")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
@ -130,6 +102,18 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.processResources {
|
tasks.processResources {
|
||||||
|
inputs.property("id", modId)
|
||||||
|
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)
|
||||||
|
inputs.property("minimumMinecraftVersion", minimumMinecraftVersion)
|
||||||
|
inputs.property("minimumNeoForgeVersion", minimumNeoForgeVersion)
|
||||||
|
inputs.property("minimumFabricVersion", minimumFabricVersion)
|
||||||
|
|
||||||
from(rootProject.sourceSets.main.get().resources) {
|
from(rootProject.sourceSets.main.get().resources) {
|
||||||
expand(inputs.properties)
|
expand(inputs.properties)
|
||||||
}
|
}
|
||||||
@ -137,12 +121,18 @@ subprojects {
|
|||||||
|
|
||||||
tasks.jar {
|
tasks.jar {
|
||||||
archiveVersion.set(jarVersion)
|
archiveVersion.set(jarVersion)
|
||||||
entryCompression = ZipEntryCompression.STORED
|
|
||||||
|
|
||||||
from(rootProject.file("LICENSE"))
|
from(rootProject.file("LICENSE"))
|
||||||
|
|
||||||
manifest {
|
manifest {
|
||||||
packageInformation(modId, "$modNameStripped-${project.name}")
|
attributes(
|
||||||
|
"Specification-Title" to modId,
|
||||||
|
"Specification-Vendor" to modAuthor,
|
||||||
|
"Specification-Version" to "1",
|
||||||
|
"Implementation-Title" to "$modNameStripped-${project.name}",
|
||||||
|
"Implementation-Vendor" to modAuthor,
|
||||||
|
"Implementation-Version" to modVersion,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,54 +141,37 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Manifest.packageInformation(specificationTitle: String, implementationTitle: String) {
|
loom {
|
||||||
attributes(
|
runs {
|
||||||
"Specification-Title" to specificationTitle,
|
val runJvmArgs: Set<String> by project
|
||||||
"Specification-Vendor" to modAuthor,
|
|
||||||
"Specification-Version" to "1",
|
configureEach {
|
||||||
"Implementation-Title" to implementationTitle,
|
runDir("../run")
|
||||||
"Implementation-Vendor" to modAuthor,
|
vmArgs(runJvmArgs)
|
||||||
"Implementation-Version" to modVersion,
|
ideConfigGenerated(true)
|
||||||
)
|
}
|
||||||
|
|
||||||
|
named("client") {
|
||||||
|
configName = "Vanilla Client"
|
||||||
|
client()
|
||||||
|
}
|
||||||
|
|
||||||
|
findByName("server")?.let(::remove)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val multiloaderSources = sourceSets.register("multiloader")
|
val copyJars = tasks.register<Copy>("copyJars") {
|
||||||
|
|
||||||
val multiloaderJar = tasks.register<Jar>("multiloaderJar") {
|
|
||||||
group = "build"
|
group = "build"
|
||||||
|
duplicatesStrategy = EXCLUDE
|
||||||
|
|
||||||
archiveBaseName.set(modNameStripped)
|
for (subproject in subprojects) {
|
||||||
archiveVersion.set(jarVersion)
|
dependsOn(subproject.tasks.assemble)
|
||||||
|
from(subproject.base.libsDirectory.file("${subproject.base.archivesName.get()}-$jarVersion.jar"))
|
||||||
destinationDirectory = layout.buildDirectory.dir("dist")
|
|
||||||
|
|
||||||
fun includeJar(project: Project, jarTask: (TaskContainer) -> TaskProvider<out Jar>) {
|
|
||||||
from(jarTask(project.tasks).map { it.outputs }) {
|
|
||||||
into("jars")
|
|
||||||
rename { "$modNameStripped-${project.name}.jar" }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
findProject(":NeoForge")?.let { includeJar(it, TaskContainer::jar) }
|
into(project.layout.buildDirectory.dir("dist"))
|
||||||
findProject(":Fabric")?.let { includeJar(it, TaskContainer::remapJar) }
|
|
||||||
|
|
||||||
from(multiloaderSources.map { it.output })
|
|
||||||
|
|
||||||
manifest {
|
|
||||||
packageInformation("$modId-multiloader", modNameStripped)
|
|
||||||
attributes("FMLModType" to "GAMELIBRARY")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.named<ProcessResources>("processMultiloaderResources").configure {
|
|
||||||
inputs.property("group", project.group)
|
|
||||||
inputs.property("jarPrefix", modNameStripped)
|
|
||||||
|
|
||||||
filesMatching(listOf("fabric.mod.json", "META-INF/jarjar/metadata.json")) {
|
|
||||||
expand(inputs.properties)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.assemble {
|
tasks.assemble {
|
||||||
finalizedBy(multiloaderJar)
|
finalizedBy(copyJars)
|
||||||
}
|
}
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"jars": [{
|
|
||||||
"identifier": {
|
|
||||||
"group": "${group}",
|
|
||||||
"artifact": "${id}"
|
|
||||||
},
|
|
||||||
"version": {
|
|
||||||
"artifactVersion": "${version}",
|
|
||||||
"range": "[${version}]"
|
|
||||||
},
|
|
||||||
"path": "jars/${jarPrefix}-NeoForge.jar"
|
|
||||||
}]
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
{
|
|
||||||
"schemaVersion": 1,
|
|
||||||
"id": "${id}_multiloader",
|
|
||||||
"name": "${name} (Multiloader)",
|
|
||||||
"description": "${description}",
|
|
||||||
"version": "${version}",
|
|
||||||
"license": "${license}",
|
|
||||||
|
|
||||||
"icon": "assets/${id}/logo.png",
|
|
||||||
|
|
||||||
"authors": [
|
|
||||||
"${author}"
|
|
||||||
],
|
|
||||||
|
|
||||||
"contact": {
|
|
||||||
"homepage": "https://chylex.com",
|
|
||||||
"issues": "${issuesURL}",
|
|
||||||
"sources": "${sourcesURL}"
|
|
||||||
},
|
|
||||||
|
|
||||||
"environment": "client",
|
|
||||||
|
|
||||||
"jars": [{
|
|
||||||
"file": "jars/${jarPrefix}-Fabric.jar"
|
|
||||||
}],
|
|
||||||
|
|
||||||
"custom": {
|
|
||||||
"modmenu": {
|
|
||||||
"parent": "${id}",
|
|
||||||
"badges": [ "library" ],
|
|
||||||
"update_checker": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user