瀏覽代碼

Dynamically shorten generated gradle file

The dependency section is not generated when no packages are given. This makes the config file easier to read for plugin-only configs.
main
Sindre Stephansen 2 年之前
父節點
當前提交
e3adc2ea2e
簽署人: sindre <sindre@sindrestephansen.com> GPG 金鑰 ID: B06FC67D17A46ADE
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. +4
    -2
      sync/src/gradle.py

+ 4
- 2
sync/src/gradle.py 查看文件

@@ -20,7 +20,7 @@ plugins {
""" + '\n '.join(f'id("{name}") version "{version}"' for name, version in plugins.items()) + """
}
""" + ("""
repositories {
maven {
url=uri("http://""" + repo + """/releases")
@@ -65,4 +65,6 @@ tasks.register("downloadDependencies") {
}
}
}
"""
""" if packages else """
tasks.register("downloadDependencies") {}
""")

Loading…
取消
儲存