11buildscript {
22 repositories {
3+ // These repositories are only for Gradle plugins, put any other repositories in the repository block further below
34 maven { url = ' https://maven.minecraftforge.net' }
45 mavenCentral()
56 }
@@ -12,15 +13,16 @@ apply plugin: 'net.minecraftforge.gradle'
1213apply plugin : ' eclipse'
1314apply plugin : ' maven-publish'
1415
15- version = ' 1.4.4 '
16+ version = ' 1.4.5 '
1617group = ' com.kevsterking.imagemod' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
1718archivesBaseName = ' imagemod'
1819
19- java. toolchain. languageVersion = JavaLanguageVersion . of(8 ) // Mojang ships Java 8 to end users, so your mod should target Java 8.
20+ // Mojang ships Java 16 to end users in 1.17+ instead of Java 8 in 1.16 or lower, so your mod should target Java 16.
21+ java. toolchain. languageVersion = JavaLanguageVersion . of(16 )
2022
2123println (' Java: ' + System . getProperty(' java.version' ) + ' JVM: ' + System . getProperty(' java.vm.version' ) + ' (' + System . getProperty(' java.vendor' ) + ' ) Arch: ' + System . getProperty(' os.arch' ))
2224minecraft {
23- // The mappings can be changed at any time, and must be in the following format.
25+ // The mappings can be changed at any time and must be in the following format.
2426 // Channel: Version:
2527 // snapshot YYYYMMDD Snapshot are built nightly.
2628 // stable # Stables are built at the discretion of the MCP team.
@@ -29,12 +31,11 @@ minecraft {
2931 // You must be aware of the Mojang license when using the 'official' mappings.
3032 // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
3133 //
32- // Use non-default mappings at your own risk. they may not always work.
34+ // Use non-default mappings at your own risk. They may not always work.
3335 // Simply re-run your setup task after changing the mappings to update your workspace.
34- mappings channel : ' official' , version : ' 1.16.5'
35- // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
36-
37- // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
36+ mappings channel : ' official' , version : ' 1.17.1'
37+
38+ // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.
3839
3940 // Default run configurations.
4041 // These can be tweaked, removed, or duplicated as needed.
@@ -43,7 +44,7 @@ minecraft {
4344 workingDirectory project. file(' run' )
4445
4546 // Recommended logging data for a userdev environment
46- // The markers can be changed as needed.
47+ // The markers can be added/remove as needed separated by commas .
4748 // "SCAN": For mods scan.
4849 // "REGISTRIES": For firing of registry events.
4950 // "REGISTRYDUMP": For getting the contents of all registries.
@@ -65,7 +66,7 @@ minecraft {
6566 workingDirectory project. file(' run' )
6667
6768 // Recommended logging data for a userdev environment
68- // The markers can be changed as needed.
69+ // The markers can be added/remove as needed separated by commas .
6970 // "SCAN": For mods scan.
7071 // "REGISTRIES": For firing of registry events.
7172 // "REGISTRYDUMP": For getting the contents of all registries.
@@ -87,7 +88,7 @@ minecraft {
8788 workingDirectory project. file(' run' )
8889
8990 // Recommended logging data for a userdev environment
90- // The markers can be changed as needed.
91+ // The markers can be added/remove as needed separated by commas .
9192 // "SCAN": For mods scan.
9293 // "REGISTRIES": For firing of registry events.
9394 // "REGISTRYDUMP": For getting the contents of all registries.
@@ -113,52 +114,55 @@ minecraft {
113114// Include resources generated by data generators.
114115sourceSets. main. resources { srcDir ' src/generated/resources' }
115116
116- dependencies {
117- // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
118- // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
119- // The userdev artifact is a special name and will get all sorts of transformations applied to it.
120- minecraft ' net.minecraftforge:forge:1.16.5-36.2.34'
117+ repositories {
118+ // Put repositories for dependencies here
119+ // ForgeGradle automatically adds the Forge maven and Maven Central for you
121120
122- // You may put jars on which you depend on in ./libs or you may define them like so..
123- // compile "some.group:artifact:version:classifier"
124- // compile "some.group:artifact:version"
121+ // If you have mod jar dependencies in ./libs, you can declare them as a repository like so:
122+ // flatDir {
123+ // dir 'libs'
124+ // }
125+ }
125126
126- // Real examples
127- // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
128- // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
127+ dependencies {
128+ // Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed
129+ // that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
130+ // The userdev artifact is a special name and will get all sorts of transformations applied to it.
131+ minecraft ' net.minecraftforge:forge:1.17.1-37.1.1'
129132
130- // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
131- // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
133+ // Real mod deobf dependency examples - these get remapped to your current mappings
134+ // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
135+ // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
136+ // implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency
132137
133- // These dependencies get remapped to your current MCP mappings
134- // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
138+ // Examples using mod jars from ./libs
139+ // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
135140
136141 // For more info...
137142 // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
138143 // http://www.gradle.org/docs/current/userguide/dependency_management.html
139-
140144}
141145
142- // Example for how to get properties into the manifest for reading by the runtime. .
146+ // Example for how to get properties into the manifest for reading at runtime.
143147jar {
144148 manifest {
145149 attributes([
146- " Specification-Title" : " ImageMod" ,
147- " Specification-Vendor" : " Kevsterking" ,
148- " Specification-Version" : " 1" , // We are version 1 of ourselves
149- " Implementation-Title" : project. name,
150- " Implementation-Version" : " ${ version } " ,
151- " Implementation-Vendor" : " Kevsterking" ,
152- " Implementation-Timestamp" : new Date (). format(" yyyy-MM-dd'T'HH:mm:ssZ" )
150+ " Specification-Title" : " ImageMod" ,
151+ " Specification-Vendor" : " Kevsterking" ,
152+ " Specification-Version" : " 1" , // We are version 1 of ourselves
153+ " Implementation-Title" : project. name,
154+ " Implementation-Version" : project . jar . archiveVersion ,
155+ " Implementation-Vendor" : " Kevsterking" ,
156+ " Implementation-Timestamp" : new Date (). format(" yyyy-MM-dd'T'HH:mm:ssZ" )
153157 ])
154158 }
155159}
156160
157- // Example configuration to allow publishing using the maven-publish task
161+ // Example configuration to allow publishing using the maven-publish plugin
158162// This is the preferred method to reobfuscate your jar file
159- jar. finalizedBy(' reobfJar' )
163+ jar. finalizedBy(' reobfJar' )
160164// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
161- // publish.dependsOn('reobfJar')
165+ // publish.dependsOn('reobfJar')
162166
163167publishing {
164168 publications {
@@ -168,7 +172,7 @@ publishing {
168172 }
169173 repositories {
170174 maven {
171- url " file:/// ${ project.projectDir} /mcmodsrepo"
175+ url " file://${ project.projectDir} /mcmodsrepo"
172176 }
173177 }
174178}
0 commit comments