Przeglądaj źródła

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 lat temu
rodzic
commit
e3adc2ea2e
Podpisane przez: sindre <sindre@sindrestephansen.com> ID klucza GPG: B06FC67D17A46ADE
1 zmienionych plików z 4 dodań i 2 usunięć
  1. +4
    -2
      sync/src/gradle.py

+ 4
- 2
sync/src/gradle.py Wyświetl plik

@@ -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") {}
""")

Ładowanie…
Anuluj
Zapisz