Simply processResources logic & make it compatible with future versions of Gradle (#69)
* Ignore commonly generated Mac OS junk files This is optional, but it would be a huge quality of life improvement for anyone developing on Mac OS, as the first thing I do when starting a new project is always to add this to the .gitignore. Example: Just from the small changes I've made to the build script alone, I've generated 4 .DS_Store files, which would clutter up this PR if I included them. * Simply processResources logic & make it compatible with future versions of Gradle When the processResources task is currently run, it uses deprecated Gradle features. Running "gradle clean build --warning-mode all" should output a message along the lines of "Copying or archiving duplicate paths with the default duplicates strategy has been deprecated. This is scheduled to be removed in Gradle 7.0.". This is due to inlcuding all files twice, as the "from" blocks includes them for the second time (gradle includes these files by default). This PR simply edits the relevant files from the already selected resources directory. This also reduces the amount of repetition in the script. * Switch to double quotes to match style D'oh!
This commit is contained in:
		
							parent
							
								
									4237368e64
								
							
						
					
					
						commit
						54035654b7
					
				
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -24,6 +24,10 @@ bin/
 | 
				
			|||||||
.classpath
 | 
					.classpath
 | 
				
			||||||
.project
 | 
					.project
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# macos
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*.DS_Store
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# fabric
 | 
					# fabric
 | 
				
			||||||
 | 
					
 | 
				
			||||||
run/
 | 
					run/
 | 
				
			||||||
 | 
				
			|||||||
@ -26,14 +26,9 @@ dependencies {
 | 
				
			|||||||
processResources {
 | 
					processResources {
 | 
				
			||||||
	inputs.property "version", project.version
 | 
						inputs.property "version", project.version
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	from(sourceSets.main.resources.srcDirs) {
 | 
						filesMatching("fabric.mod.json") {
 | 
				
			||||||
		include "fabric.mod.json"
 | 
					 | 
				
			||||||
		expand "version": project.version
 | 
							expand "version": project.version
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	from(sourceSets.main.resources.srcDirs) {
 | 
					 | 
				
			||||||
		exclude "fabric.mod.json"
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ensure that the encoding is set to UTF-8, no matter what the system default is
 | 
					// ensure that the encoding is set to UTF-8, no matter what the system default is
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user