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.

build.gradle 659B

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