/** * @return URL of artifact in Bintray, eg: * "https://bintray.com/shipkit/examples/download_file?file_path=org/mockito/release-tools-example/api/0.15.0/api-0.15.0.jar" */ @Override public String getDefaultUrl(String extension) { BintrayExtension bintrayExtension = project.getExtensions().getByType(BintrayExtension.class); return String.format("https://bintray.com/%s/%s/download_file?file_path=%s/%s/%s/%s-%s%s", bintrayExtension.getPkg().getUserOrg(), bintrayExtension.getPkg().getRepo(), project.getGroup().toString().replace('.', '/'), artifactBaseName, previousVersion, artifactBaseName, previousVersion, extension); } }
/** * @return URL of artifact in Bintray, eg: * "https://bintray.com/shipkit/examples/download_file?file_path=org/mockito/release-tools-example/api/0.15.0/api-0.15.0.jar" */ @Override public String getDefaultUrl(String extension) { BintrayExtension bintrayExtension = project.getExtensions().getByType(BintrayExtension.class); String userOrgOrName = bintrayExtension.getPkg().getUserOrg(); if (userOrgOrName == null) { userOrgOrName = bintrayExtension.getUser(); } return String.format("https://bintray.com/%s/%s/download_file?file_path=%s/%s/%s/%s-%s%s", userOrgOrName, bintrayExtension.getPkg().getRepo(), project.getGroup().toString().replace('.', '/'), artifactBaseName, previousVersion, artifactBaseName, previousVersion, extension); } }
/** * @return URL of artifact in Bintray, eg: * "https://bintray.com/shipkit/examples/download_file?file_path=org/mockito/release-tools-example/api/0.15.0/api-0.15.0.jar" */ @Override public String getDefaultUrl(String extension) { BintrayExtension bintrayExtension = project.getExtensions().getByType(BintrayExtension.class); String userOrgOrName = bintrayExtension.getPkg().getUserOrg(); if (userOrgOrName == null) { userOrgOrName = bintrayExtension.getUser(); } return String.format("https://bintray.com/%s/%s/download_file?file_path=%s/%s/%s/%s-%s%s", userOrgOrName, bintrayExtension.getPkg().getRepo(), project.getGroup().toString().replace('.', '/'), artifactBaseName, previousVersion, artifactBaseName, previousVersion, extension); } }
/** * Constructs link to bintray repository. * * @param bintray * @return repository link */ public static String getRepoLink(BintrayExtension bintray) { String repo = bintray.getPkg().getRepo(); String pkg = bintray.getPkg().getName(); String org = bintray.getPkg().getUserOrg(); if (org == null) { org = bintray.getUser(); } return MessageFormat.format("https://bintray.com/{0}/{1}/{2}/", org, repo, pkg); } }
/** * Constructs link to bintray repository. * * @param bintray * @return repository link */ public static String getRepoLink(BintrayExtension bintray) { String repo = bintray.getPkg().getRepo(); String pkg = bintray.getPkg().getName(); String org = bintray.getPkg().getUserOrg(); if (org == null) { org = bintray.getUser(); } return MessageFormat.format("https://bintray.com/{0}/{1}/{2}", org, repo, pkg); } }
/** * Constructs link to bintray repository. * * @param bintray * @return repository link */ public static String getRepoLink(BintrayExtension bintray) { String repo = bintray.getPkg().getRepo(); String pkg = bintray.getPkg().getName(); String org = bintray.getPkg().getUserOrg(); if (org == null) { org = bintray.getUser(); } return MessageFormat.format("https://bintray.com/{0}/{1}/{2}/", org, repo, pkg); } }