GitUtils { public String getRemoteUrl(Project project, String remote) { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ExecResult execResult = project.exec(execSpec -> { execSpec.workingDir(project.getProjectDir()); execSpec.commandLine("git", "ls-remote", "--get-url", remote); execSpec.setStandardOutput(outputStream); }); execResult.rethrowFailure().assertNormalExitValue(); return outputStream.toString().trim(); }  static boolean currentlyRunningOnTravisCi(); static boolean currentlyRunningOnGithubActions(); @Nullable static String findSlug(Project project); @Nullable String findTravisSlug(Project project); String getRemoteUrl(Project project, String remote); File findWorkingDirectory(Project project); String getTag(Project project); @Nullable String findGithubUsername(Project project); @Nullable String findGithubToken(Project project);  }
@Test void getRemoteUrl() { assertThat(GitUtils.getRemoteUrl(project, "origin")) .contains("freefair/gradle-plugins"); }