mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-23 15:36:54 +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:
parent
ab4e1dee63
commit
6cb3657080
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@
|
||||
/logs
|
||||
/gradle*
|
||||
/*.gradle
|
||||
/*.gradle.kts
|
||||
/build
|
||||
|
||||
# Misc
|
||||
|
27
go4it
27
go4it
@ -77,24 +77,29 @@ def setup() -> None:
|
||||
else:
|
||||
shutil.copy2(src, file)
|
||||
|
||||
with open("settings.gradle", "w") as h:
|
||||
with open("settings.gradle.kts", "w") as h:
|
||||
h.write(dedent("""\
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven {
|
||||
name = 'Fabric'
|
||||
url = 'https://maven.fabricmc.net/'
|
||||
}
|
||||
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:
|
||||
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
|
||||
|
||||
log("Installing npm packages")
|
||||
@ -108,7 +113,11 @@ def gen_runs() -> None:
|
||||
Generate .idea run files
|
||||
"""
|
||||
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")
|
||||
for path in pathlib.Path(".idea/runConfigurations").glob("*.xml"):
|
||||
|
Loading…
Reference in New Issue
Block a user