pkg.setWebsiteUrl(conf.getGitHub().getUrl() + "/" + conf.getGitHub().getRepository());
pkg.setWebsiteUrl(conf.getGitHub().getUrl() + "/" + conf.getGitHub().getRepository());
/** * Configure the Bintray plugin * * <ul> * <li>Set Bintray user and password from Gradle properties file or environment * <li>Configure the Bintray package * </ul> * * @param bintray Bintray plugin's configuration * @param projectConfig Project configuration * @param bintrayConfig Bintray configuration * @param project Project context */ @Defaults public void configureBintrayExtension(BintrayExtension bintray, ProjectConfig projectConfig, BintrayConfig bintrayConfig, ProjectContext project) { bintray.setUser(project.getProperty("bintray.user")); bintray.setKey(project.getProperty("bintray.key")); PackageConfig pkg = bintray.getPkg(); pkg.setName(project.getName()); pkg.setDesc(project.getDescription()); pkg.setRepo(bintrayConfig.getRepository()); pkg.setVcsUrl(projectConfig.getRepository().getConnection()); pkg.setWebsiteUrl(projectConfig.getWebsiteUrl()); pkg.setIssueTrackerUrl(projectConfig.getIssueTracker().getWebsiteUrl()); pkg.setLicenses(projectConfig.getLicense().getId()); VersionConfig version = pkg.getVersion(); version.setName(project.getVersion().toString()); version.setVcsTag(project.getName() + "-" + project.getVersion()); }
/** * Configure the Bintray plugin * * <ul> * <li>Set Bintray user and password from Gradle properties file or environment * <li>Configure the Bintray package * </ul> * * @param bintray Bintray plugin's configuration * @param projectConfig Project configuration * @param bintrayConfig Bintray configuration * @param project Project context */ @Defaults public void configureBintrayExtension(BintrayExtension bintray, ProjectConfig projectConfig, BintrayConfig bintrayConfig, ProjectContext project) { bintray.setUser(project.getProperty("bintray.user")); bintray.setKey(project.getProperty("bintray.key")); PackageConfig pkg = bintray.getPkg(); pkg.setName(project.getName()); pkg.setDesc(project.getDescription()); pkg.setRepo(bintrayConfig.getRepository()); pkg.setVcsUrl(projectConfig.getRepository().getConnection()); pkg.setWebsiteUrl(projectConfig.getWebsiteUrl()); pkg.setIssueTrackerUrl(projectConfig.getIssueTracker().getWebsiteUrl()); pkg.setLicenses(projectConfig.getLicense().getId()); VersionConfig version = pkg.getVersion(); version.setName(project.getVersion().toString()); version.setVcsTag(project.getName() + "-" + project.getVersion()); }
public void run() { //Below overwrites prior value in case the user configured dry run directly on the bintray extension. //It should be ok. bintray.setDryRun(conf.isDryRun()); if (pkg.getDesc() == null) { pkg.setDesc(project.getDescription()); } if (pkg.getVersion().getVcsTag() == null) { pkg.getVersion().setVcsTag("v" + project.getVersion()); } if (pkg.getWebsiteUrl() == null) { pkg.setWebsiteUrl(conf.getGitHub().getUrl() + "/" + conf.getGitHub().getRepository()); } if (pkg.getIssueTrackerUrl() == null) { pkg.setIssueTrackerUrl(conf.getGitHub().getUrl() + "/" + conf.getGitHub().getRepository() + "/issues"); } if (pkg.getVcsUrl() == null) { pkg.setVcsUrl(conf.getGitHub().getUrl() + "/" + conf.getGitHub().getRepository() + ".git"); } } });