You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920
  1. import java.nio.file.Files;
  2. import java.nio.file.Paths;
  3. import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
  4. task createWrapper(type: Wrapper) {
  5. description 'Downloads and installs an up-to-date wrapper for gradle.'
  6. gradleVersion = '2.1'
  7. }
  8. task installCommitIdHook {
  9. description 'Installs a git hook to insert Commit-Id lines into submodule commits.'
  10. doLast {
  11. def hook = Paths.get('etc/gerrit/commit-msg')
  12. file('.git/modules/').eachDir() {
  13. dir -> Files.copy(hook, dir.toPath().resolve('hooks').resolve('commit-msg'), REPLACE_EXISTING)
  14. }
  15. }
  16. }