@@ -6,74 +6,62 @@ plugins {
6
6
id ' fabric-loom' version ' 0.12-SNAPSHOT'
7
7
}
8
8
9
- allprojects {
10
- apply plugin : ' java'
11
- apply plugin : ' checkstyle'
12
- apply plugin : ' fabric-loom'
9
+ apply plugin : ' java'
10
+ apply plugin : ' checkstyle'
11
+ apply plugin : ' fabric-loom'
13
12
14
- group = project. maven_group
15
- version = project. mod_version
16
- archivesBaseName = " ${ project.mod_id} -mc${ project.minecraft_version} "
13
+ group = project. maven_group
14
+ version = project. mod_version
15
+ archivesBaseName = " ${ project.mod_id} -mc${ project.minecraft_version} "
17
16
18
- sourceCompatibility = targetCompatibility = JavaVersion . VERSION_17
17
+ sourceCompatibility = targetCompatibility = JavaVersion . VERSION_17
19
18
20
19
// Declare dependencies
21
- dependencies {
22
- // Fabric
23
- minecraft " com.mojang:minecraft:${ project.minecraft_version} "
24
- mappings " net.fabricmc:yarn:${ project.yarn_mappings} :v2"
25
- modImplementation " net.fabricmc:fabric-loader:${ project.loader_version} "
26
-
27
- // Mods
28
- modImplementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_version} "
29
- modImplementation " com.terraformersmc:modmenu:${ project.mod_menu_version} "
30
-
31
- // Code Quality
32
- compileOnly " org.jetbrains:annotations:${ project.jetbrains_annotations_version} "
33
- testImplementation " org.junit.jupiter:junit-jupiter-api:${ project.junit_jupiter_version} "
34
- testRuntimeOnly " org.junit.jupiter:junit-jupiter-engine:${ project.junit_jupiter_version} "
35
-
36
- // Subprojects
37
- subprojects. each {
38
- implementation project(path : " :${ it.name} " , configuration : ' namedElements' )
39
- include project(" ${ it.name} :" ) // nest within distribution
40
- }
41
- }
20
+ dependencies {
21
+ // Fabric
22
+ minecraft " com.mojang:minecraft:${ project.minecraft_version} "
23
+ mappings " net.fabricmc:yarn:${ project.yarn_mappings} :v2"
24
+ modImplementation " net.fabricmc:fabric-loader:${ project.loader_version} "
25
+
26
+ // Mods
27
+ modImplementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_version} "
28
+ modImplementation " com.terraformersmc:modmenu:${ project.mod_menu_version} "
29
+
30
+ // Code Quality
31
+ compileOnly " org.jetbrains:annotations:${ project.jetbrains_annotations_version} "
32
+ }
42
33
43
34
// Produce a sources distribution
44
- java {
45
- withSourcesJar()
46
- }
35
+ java {
36
+ withSourcesJar()
37
+ }
47
38
48
39
// Add the licence to all distributions
49
- tasks. withType(Jar ). configureEach {
50
- it. from rootProject. file(' LICENSE.txt' )
51
- }
40
+ tasks. withType(Jar ). configureEach {
41
+ it. from rootProject. file(' LICENSE.txt' )
42
+ }
52
43
53
44
// Process any resources
54
- processResources {
55
- inputs. property ' id' , project. mod_id
56
- inputs. property ' name' , project. mod_name
57
- inputs. property ' version' , project. version
58
-
59
- // fabric.mod.json
60
- filesMatching(' fabric.mod.json' ) {
61
- expand([' id' : project. mod_id, ' name' : project. mod_name, ' version' : project. version])
62
- }
45
+ processResources {
46
+ inputs. property ' id' , project. mod_id
47
+ inputs. property ' name' , project. mod_name
48
+ inputs. property ' version' , project. version
49
+ filesMatching(' fabric.mod.json' ) {
50
+ expand([' id' : project. mod_id, ' name' : project. mod_name, ' version' : project. version])
63
51
}
52
+ }
64
53
65
54
// Perform linting using Checkstyle
66
- checkstyle {
67
- configFile rootProject. file(' .checkstyle.xml' )
68
- toolVersion project. checkstyle_version
69
- }
55
+ checkstyle {
56
+ configFile rootProject. file(' .checkstyle.xml' )
57
+ toolVersion project. checkstyle_version
58
+ }
70
59
71
60
// Add any additional repositories
72
- repositories {
73
- mavenCentral()
74
- maven { name ' Fabric' ; url ' https://maven.fabricmc.net/' }
75
- maven { name ' TerraformersMC' ; url ' https://maven.terraformersmc.com/' }
76
- }
61
+ repositories {
62
+ mavenCentral()
63
+ maven { name ' Fabric' ; url ' https://maven.fabricmc.net/' }
64
+ maven { name ' TerraformersMC' ; url ' https://maven.terraformersmc.com/' }
77
65
}
78
66
79
67
// Define how artifacts are published to Modrinth (https://modrinth.com)
@@ -92,7 +80,7 @@ modrinth {
92
80
// Set the release version
93
81
versionNumber = project. version
94
82
// Set the release notes
95
- changelog = " For a list of changes, please refer to https://github.com/${ project.github_repo} /releases/tag/v ${ project.version} "
83
+ changelog = " For a list of changes, please refer to https://github.com/${ project.github_repo} /releases/tag/${ project.version} "
96
84
// Add all supported mod loaders
97
85
loaders = [' fabric' ]
98
86
// Add all supported game versions
0 commit comments