mirror of
https://github.com/chylex/Minecraft-Window-Title.git
synced 2025-05-19 18:34:06 +02:00
Add mod jsons & build.gradle
This commit is contained in:
parent
a63cbff165
commit
abaa23c5c2
Fabric
Forge
47
Fabric/build.gradle
Normal file
47
Fabric/build.gradle
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
plugins{
|
||||||
|
id 'fabric-loom' version '0.2.6-SNAPSHOT'
|
||||||
|
id 'maven-publish'
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
|
||||||
|
archivesBaseName = project.archives_base_name + '-' + project.minecraft_version
|
||||||
|
version = project.mod_version
|
||||||
|
group = project.maven_group
|
||||||
|
|
||||||
|
minecraft{}
|
||||||
|
|
||||||
|
dependencies{
|
||||||
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||||
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||||
|
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||||
|
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
|
}
|
||||||
|
|
||||||
|
processResources{
|
||||||
|
inputs.property "version", project.version
|
||||||
|
|
||||||
|
from(sourceSets.main.resources.srcDirs){
|
||||||
|
include "fabric.mod.json"
|
||||||
|
expand "version": project.version
|
||||||
|
}
|
||||||
|
|
||||||
|
from(sourceSets.main.resources.srcDirs){
|
||||||
|
exclude "fabric.mod.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// fix jar file name
|
||||||
|
version = 'v' + version
|
||||||
|
|
||||||
|
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
||||||
|
// this fixes some edge cases with special characters not displaying correctly
|
||||||
|
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
||||||
|
tasks.withType(JavaCompile){
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
jar{
|
||||||
|
from "../LICENSE"
|
||||||
|
}
|
@ -1,3 +1,17 @@
|
|||||||
# Done to increase the memory available to gradle.
|
# Done to increase the memory available to gradle.
|
||||||
org.gradle.jvmargs=-Xmx1G
|
org.gradle.jvmargs=-Xmx1G
|
||||||
|
|
||||||
|
# Fabric Properties
|
||||||
|
# check these on https://fabricmc.net/use
|
||||||
|
minecraft_version=1.15.2
|
||||||
|
yarn_mappings=1.15.2+build.1
|
||||||
|
loader_version=0.7.5+build.178
|
||||||
|
|
||||||
|
# Mod Properties
|
||||||
|
mod_version = 1.0.0
|
||||||
|
maven_group = chylex.customwindowtitle.forge
|
||||||
|
archives_base_name = CustomWindowTitle
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
|
fabric_version=0.4.29+build.290-1.15
|
||||||
|
32
Fabric/src/main/resources/fabric.mod.json
Normal file
32
Fabric/src/main/resources/fabric.mod.json
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"schemaVersion": 1,
|
||||||
|
"id": "customwindowtitle",
|
||||||
|
"version": "${version}",
|
||||||
|
|
||||||
|
"name": "Custom Window Title",
|
||||||
|
"authors": [
|
||||||
|
"chylex"
|
||||||
|
],
|
||||||
|
"contact": {
|
||||||
|
"homepage": "https://chylex.com",
|
||||||
|
"sources": "https://github.com/chylex/Minecraft-Window-Title",
|
||||||
|
"issues": "https://github.com/chylex/Minecraft-Window-Title/issues"
|
||||||
|
},
|
||||||
|
|
||||||
|
"license": "Unlicense",
|
||||||
|
|
||||||
|
"environment": "client",
|
||||||
|
"entrypoints": {
|
||||||
|
"client": [
|
||||||
|
"chylex.customwindowtitle.fabric.CustomWindowTitle"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mixins": [
|
||||||
|
"mixins.json"
|
||||||
|
],
|
||||||
|
|
||||||
|
"depends": {
|
||||||
|
"fabricloader": ">=0.7.2",
|
||||||
|
"minecraft": "1.15.x"
|
||||||
|
}
|
||||||
|
}
|
82
Forge/build.gradle
Normal file
82
Forge/build.gradle
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
buildscript{
|
||||||
|
repositories{
|
||||||
|
maven{ url = 'https://files.minecraftforge.net/maven' }
|
||||||
|
jcenter()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies{
|
||||||
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'net.minecraftforge.gradle'
|
||||||
|
apply plugin: 'eclipse'
|
||||||
|
|
||||||
|
def mcversion = "1.15.2"
|
||||||
|
def forgeversion = "31.0.14"
|
||||||
|
|
||||||
|
def prefixName = 'displayName = '
|
||||||
|
def prefixVersion = 'version = '
|
||||||
|
|
||||||
|
def metaLines = file('src/main/resources/META-INF/mods.toml').readLines()
|
||||||
|
def metaName = metaLines.find { line -> line.startsWith(prefixName) }.substring(prefixName.length())[1..-2]
|
||||||
|
def metaVersion = metaLines.find { line -> line.startsWith(prefixVersion) }.substring(prefixVersion.length())[1..-2]
|
||||||
|
|
||||||
|
group = 'chylex.customwindowtitle.forge'
|
||||||
|
version = metaVersion
|
||||||
|
archivesBaseName = metaName.replaceAll('\\s', '')
|
||||||
|
|
||||||
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
||||||
|
|
||||||
|
minecraft{
|
||||||
|
mappings channel: 'snapshot', version: '20200130-1.15.1'
|
||||||
|
|
||||||
|
runs{
|
||||||
|
client{
|
||||||
|
workingDirectory file('run')
|
||||||
|
|
||||||
|
mods{
|
||||||
|
customwindowtitle{
|
||||||
|
source sourceSets.main
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server{
|
||||||
|
workingDirectory file('run')
|
||||||
|
|
||||||
|
mods{
|
||||||
|
customwindowtitle{
|
||||||
|
source sourceSets.main
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies{
|
||||||
|
minecraft 'net.minecraftforge:forge:' + mcversion + '-' + forgeversion
|
||||||
|
}
|
||||||
|
|
||||||
|
jar{
|
||||||
|
archiveName = archivesBaseName + '-' + mcversion + '-v' + version + '.jar'
|
||||||
|
|
||||||
|
from('../'){
|
||||||
|
include 'LICENSE'
|
||||||
|
}
|
||||||
|
|
||||||
|
manifest{
|
||||||
|
attributes([
|
||||||
|
'Specification-Title' : 'customwindowtitle',
|
||||||
|
'Specification-Version': '1',
|
||||||
|
'Specification-Vendor' : 'chylex',
|
||||||
|
|
||||||
|
'Implementation-Title' : metaName,
|
||||||
|
'Implementation-Version': metaVersion,
|
||||||
|
'Implementation-Vendor' : 'chylex',
|
||||||
|
|
||||||
|
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}
|
25
Forge/src/main/resources/META-INF/mods.toml
Normal file
25
Forge/src/main/resources/META-INF/mods.toml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
modLoader = "javafml"
|
||||||
|
loaderVersion = "[31,)"
|
||||||
|
|
||||||
|
authors = "chylex"
|
||||||
|
issueTrackerURL = "https://github.com/chylex/Minecraft-Window-Title/issues"
|
||||||
|
|
||||||
|
[[mods]]
|
||||||
|
modId = "customwindowtitle"
|
||||||
|
version = "1.0.0"
|
||||||
|
displayName = "Custom Window Title"
|
||||||
|
displayURL = "https://github.com/chylex/Minecraft-Window-Title"
|
||||||
|
|
||||||
|
[[dependencies.customwindowtitle]]
|
||||||
|
modId = "minecraft"
|
||||||
|
mandatory = true
|
||||||
|
versionRange = "[1.15.2,)"
|
||||||
|
ordering = "NONE"
|
||||||
|
side = "CLIENT"
|
||||||
|
|
||||||
|
[[dependencies.customwindowtitle]]
|
||||||
|
modId = "forge"
|
||||||
|
mandatory = true
|
||||||
|
versionRange = "[31,)"
|
||||||
|
ordering = "NONE"
|
||||||
|
side = "CLIENT"
|
7
Forge/src/main/resources/pack.mcmeta
Normal file
7
Forge/src/main/resources/pack.mcmeta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"description": "Custom Window Title",
|
||||||
|
"pack_format": 5,
|
||||||
|
"_comment": ""
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user