Skip to content

Commit f9694f5

Browse files
committed
gradle stuff merge
2 parents 4979dca + 11a9eae commit f9694f5

File tree

7 files changed

+42
-100
lines changed

7 files changed

+42
-100
lines changed

build.gradle

Lines changed: 16 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,32 @@
11
plugins {
2-
id 'fabric-loom' version '1.2-SNAPSHOT'
3-
id 'maven-publish'
2+
id 'fabric-loom' version '1.2-SNAPSHOT'
43
}
54

6-
version = project.mod_version
7-
group = project.maven_group
5+
version = project.simpleclient_version
6+
group = "simpleclient"
87

98
repositories {
10-
// Add repositories to retrieve artifacts from in here.
11-
// You should only use this when depending on other mods because
12-
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
13-
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
14-
// for more information about repositories.
159
}
1610

1711
dependencies {
18-
// To change the versions see the gradle.properties file
19-
minecraft "com.mojang:minecraft:${project.minecraft_version}"
20-
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
21-
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
22-
23-
// Fabric API. This is technically optional, but you probably want it anyway.
24-
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
25-
26-
// Uncomment the following line to enable the deprecated Fabric API modules.
27-
// These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time.
28-
29-
// modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
30-
}
31-
32-
base {
33-
archivesName = project.archives_base_name
12+
// Minecraft and Fabric Dependencies
13+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
14+
mappings loom.officialMojangMappings()
15+
modImplementation "net.fabricmc:fabric-loader:${project.fabric_loader_version}"
16+
// Fabric API
17+
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
3418
}
3519

3620
processResources {
37-
inputs.property "version", project.version
38-
39-
filesMatching("fabric.mod.json") {
40-
expand "version": project.version
21+
//inputs.property 'version', project.version
22+
filesMatching('fabric.mod.json') {
23+
expand 'version': version
24+
expand 'minecraft_version': project.minecraft_version
25+
expand 'fabric_loader_version': project.fabric_loader_version
26+
expand 'fabric_api_version': project.fabric_api_version
4127
}
4228
}
4329

4430
tasks.withType(JavaCompile).configureEach {
45-
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
46-
it.options.release = 17
47-
}
48-
49-
java {
50-
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
51-
// if it is present.
52-
// If you remove this line, sources will not be generated.
53-
withSourcesJar()
54-
55-
sourceCompatibility = JavaVersion.VERSION_17
56-
targetCompatibility = JavaVersion.VERSION_17
57-
}
58-
59-
jar {
60-
from("LICENSE") {
61-
rename { "${it}_${base.archivesName.get()}"}
62-
}
63-
}
64-
65-
// configure the maven publication
66-
publishing {
67-
publications {
68-
mavenJava(MavenPublication) {
69-
from components.java
70-
}
71-
}
72-
73-
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
74-
repositories {
75-
// Add repositories to publish to here.
76-
// Notice: This block does NOT have the same function as the block in the top level.
77-
// The repositories here will be used for publishing your artifact, not for
78-
// retrieving dependencies.
79-
}
31+
it.options.release = 17
8032
}

gradle.properties

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
# Done to increase the memory available to gradle.
1+
# Gradle arguments
22
org.gradle.jvmargs=-Xmx1G
33
org.gradle.parallel=true
44

5-
# Fabric Properties
6-
# check these on https://fabricmc.net/develop
7-
minecraft_version=1.19.4
8-
yarn_mappings=1.19.4+build.2
9-
loader_version=0.14.19
5+
# Minecraft (https://fabricmc.net/develop)
6+
minecraft_version=1.19.4
7+
fabric_loader_version=0.14.21
108

11-
# Mod Properties
12-
mod_version = 1.0.0
13-
maven_group = com.example
14-
archives_base_name = fabric-example-mod
9+
# SimpleClient
10+
simpleclient_version=0.0.1
1511

1612
# Dependencies
17-
fabric_version=0.79.0+1.19.4
13+
fabric_api_version=0.83.0+1.19.4

settings.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
pluginManagement {
22
repositories {
3-
maven {
4-
name = 'Fabric'
5-
url = 'https://maven.fabricmc.net/'
6-
}
3+
maven { url = 'https://maven.fabricmc.net/' }
74
mavenCentral()
85
gradlePluginPortal()
96
}
107
}
8+
rootProject.name = 'simpleclient'
-453 Bytes
Binary file not shown.
1.23 KB
Loading

src/main/resources/fabric.mod.json

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
11
{
22
"schemaVersion": 1,
3-
"id": "modid",
3+
"id": "simpleclient",
44
"version": "${version}",
5-
6-
"name": "Example Mod",
7-
"description": "This is an example description! Tell everyone what your mod is about!",
5+
"name": "SimpleClient",
6+
"description": "SimpleClient is a simple Minecraft Client",
87
"authors": [
9-
"Me!"
8+
"Fabi.exe",
9+
"Noriskky"
1010
],
1111
"contact": {
12-
"homepage": "https://fabricmc.net/",
13-
"sources": "https://github.com/FabricMC/fabric-example-mod"
12+
"homepage": "https://simpleclient.github.io",
13+
"sources": "https://github.com/SimpeClient"
1414
},
15-
16-
"license": "CC0-1.0",
17-
"icon": "assets/modid/icon.png",
18-
15+
"license": "MIT",
16+
"icon": "assets/simpleclient/icon.png",
1917
"environment": "*",
2018
"entrypoints": {
21-
"main": [
22-
"de.simpleclient.SimpleClient"
19+
"client": [
20+
"simpleclient.SimpleClient"
2321
]
2422
},
2523
"mixins": [
26-
"modid.mixins.json"
24+
"simpleclient.mixins.json"
2725
],
28-
2926
"depends": {
30-
"fabricloader": ">=0.14.19",
31-
"fabric-api": "*",
32-
"minecraft": "~1.19.4",
33-
"java": ">=17"
27+
"java": ">=17",
28+
"minecraft": "~${minecraft_version}",
29+
"fabricloader": ">=${fabric_loader_version}",
30+
"fabric-api": ">=${fabric_api_version}"
3431
},
3532
"suggests": {
36-
"another-mod": "*"
3733
}
3834
}

src/main/resources/modid.mixins.json renamed to src/main/resources/simpleclient.mixins.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"required": true,
33
"minVersion": "0.8",
4-
"package": "de.simpleclient.mixin",
4+
"package": "simpleclient.mixin",
55
"compatibilityLevel": "JAVA_17",
66
"mixins": [
77
],

0 commit comments

Comments
 (0)