download minecraft libraries through maven
This commit is contained in:
		
							parent
							
								
									836b321107
								
							
						
					
					
						commit
						daaccc87f2
					
				
					 2 changed files with 6 additions and 9 deletions
				
			
		|  | @ -51,7 +51,6 @@ jar { | ||||||
| 	manifest { | 	manifest { | ||||||
| 		attributes 'Implementation-Version': version + " Build(" + build + ")" | 		attributes 'Implementation-Version': version + " Build(" + build + ")" | ||||||
| 	} | 	} | ||||||
| 	from { zipTree("/home/asie/intellij-fernflower-1.0.0.2.jar") } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| task sourcesJar(type: Jar, dependsOn: classes) { | task sourcesJar(type: Jar, dependsOn: classes) { | ||||||
|  |  | ||||||
|  | @ -58,17 +58,15 @@ public class MinecraftLibraryProvider { | ||||||
| 
 | 
 | ||||||
| 		for (MinecraftVersionInfo.Library library : versionInfo.libraries) { | 		for (MinecraftVersionInfo.Library library : versionInfo.libraries) { | ||||||
| 			if (library.allowed() && library.getFile(MINECRAFT_LIBS) != null) { | 			if (library.allowed() && library.getFile(MINECRAFT_LIBS) != null) { | ||||||
|  | 				// TODO: Add custom library locations | ||||||
|  | 
 | ||||||
| 				// By default, they are all available on all sides | 				// By default, they are all available on all sides | ||||||
| 				boolean isClientOnly = false; | 				/* boolean isClientOnly = false; | ||||||
| 				if (library.name.contains("java3d") || library.name.contains("paulscode") || library.name.contains("lwjgl") || library.name.contains("twitch") || library.name.contains("jinput") || library.name.contains("text2speech") || library.name.contains("objc")) { | 				if (library.name.contains("java3d") || library.name.contains("paulscode") || library.name.contains("lwjgl") || library.name.contains("twitch") || library.name.contains("jinput") || library.name.contains("text2speech") || library.name.contains("objc")) { | ||||||
| 					isClientOnly = true; | 					isClientOnly = true; | ||||||
| 				} | 				} */ | ||||||
| 				if(!library.getFile(MINECRAFT_LIBS).exists()){ | 
 | ||||||
| 					project.getLogger().lifecycle(":downloading " + library.getURL()); | 				project.getDependencies().add("compile", project.getDependencies().module(library.getArtifactName())); | ||||||
| 					FileUtils.copyURLToFile(new URL(library.getURL()), library.getFile(MINECRAFT_LIBS)); |  | ||||||
| 				} |  | ||||||
| 				libs.add(library.getFile(MINECRAFT_LIBS)); |  | ||||||
| 				minecraftProvider.addDependency(library.getFile(MINECRAFT_LIBS), project); |  | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue