mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 05:33:00 +00:00 
			
		
		
		
	Update go4it to reflect recent Gradle changes
I really wanted to use includeBuild instead of include here, but it doesn't work very well with genIntellijRuns right now - I think we might need to do some more magic to fix that.
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -7,6 +7,7 @@ | |||||||
| /logs | /logs | ||||||
| /gradle* | /gradle* | ||||||
| /*.gradle | /*.gradle | ||||||
|  | /*.gradle.kts | ||||||
| /build | /build | ||||||
|  |  | ||||||
| # Misc | # Misc | ||||||
|   | |||||||
							
								
								
									
										27
									
								
								go4it
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								go4it
									
									
									
									
									
								
							| @@ -77,24 +77,29 @@ def setup() -> None: | |||||||
|         else: |         else: | ||||||
|             shutil.copy2(src, file) |             shutil.copy2(src, file) | ||||||
|  |  | ||||||
|     with open("settings.gradle", "w") as h: |     with open("settings.gradle.kts", "w") as h: | ||||||
|         h.write(dedent("""\ |         h.write(dedent("""\ | ||||||
|         pluginManagement { |         pluginManagement { | ||||||
|             repositories { |             repositories { | ||||||
|                 maven { |  | ||||||
|                     name = 'Fabric' |  | ||||||
|                     url = 'https://maven.fabricmc.net/' |  | ||||||
|                 } |  | ||||||
|                 gradlePluginPortal() |                 gradlePluginPortal() | ||||||
|  |                 maven("https://maven.minecraftforge.net") | ||||||
|  |                 maven("https://maven.parchmentmc.org") | ||||||
|  |             } | ||||||
|  |             resolutionStrategy { | ||||||
|  |                 eachPlugin { | ||||||
|  |                     if (requested.id.id == "org.spongepowered.mixin") { | ||||||
|  |                         useModule("org.spongepowered:mixingradle:${requested.version}") | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         rootProject.name = 'cc-tweaked' |         rootProject.name = "cc-tweaked" | ||||||
|         """)) |         """)) | ||||||
|         for branch in BRANCHES: |         for branch in BRANCHES: | ||||||
|             h.write(f"include '{branch.name}'\n") |             h.write(f"include(\"{branch.name}\")\n") | ||||||
|  |  | ||||||
|     with open("build.gradle", "w") as h: |     with open("build.gradle.kts", "w") as h: | ||||||
|         pass |         pass | ||||||
|  |  | ||||||
|     log("Installing npm packages") |     log("Installing npm packages") | ||||||
| @@ -108,7 +113,11 @@ def gen_runs() -> None: | |||||||
|     Generate .idea run files |     Generate .idea run files | ||||||
|     """ |     """ | ||||||
|     setup() |     setup() | ||||||
|     subprocess.check_call(["./gradlew", "--no-daemon", "genIntellijRuns"]) |  | ||||||
|  |     gen_command = ["./gradlew", "--no-daemon"] | ||||||
|  |     for branch in BRANCHES: | ||||||
|  |         gen_command.append(f"{branch.name}:genIntellijRuns") | ||||||
|  |     subprocess.check_call(gen_command) | ||||||
|  |  | ||||||
|     re = regex.compile(r"(mc-.*)_run(.*)\.xml") |     re = regex.compile(r"(mc-.*)_run(.*)\.xml") | ||||||
|     for path in pathlib.Path(".idea/runConfigurations").glob("*.xml"): |     for path in pathlib.Path(".idea/runConfigurations").glob("*.xml"): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jonathan Coates
					Jonathan Coates