Add support for parameters to start and update gradle to compile full jar

This commit is contained in:
2020-10-12 23:03:26 +02:00
parent 285ec1074a
commit d7b2d192d8
19 changed files with 153 additions and 241 deletions
@@ -11,13 +11,20 @@ public class TLWTeamsUpdater {
ArrayList<TLWMatch> matchesUpdated;
ArrayList<TLWTeam> missingTeams;
public TLWTeamsUpdater(int season, int league, ArrayList<TLWMatch> matchesUpdated) {
this.season = season;
this.league = league;
this.matchesUpdated = matchesUpdated;
missingTeams = new ArrayList<>();
public TLWTeamsUpdater(int season, int league, String configFileName) throws Exception {
TippligaSQLConnector conn = new TippligaSQLConnector();
this.season = season;
this.league = league;
this.matchesUpdated = new ArrayList<>();
TLWMatchesUpdaterFootball matchesUpdaterFootball = new TLWMatchesUpdaterFootball(season, league, configFileName);
this.matchesUpdated.addAll(matchesUpdaterFootball.getTLWMatchesUpdated());
this.matchesUpdated.addAll(conn.getMatches(String.valueOf(season), String.valueOf(league)));
missingTeams = new ArrayList<>();
teamsOriginal = conn.getTeams(String.valueOf(season), String.valueOf(league));
HashSet<Integer> missingIds = this.initMissingIds();