Skip to content

Commit

Permalink
Renaming the groupId and packages
Browse files Browse the repository at this point in the history
  • Loading branch information
dostonhamrakulov committed Dec 30, 2023
1 parent aea8e1e commit 22fd78b
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 19 deletions.
31 changes: 28 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.dostonhamrakulov</groupId>
<groupId>io.github.dostonhamrakulov</groupId>
<artifactId>java-telegram-bot-calendar</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
Expand Down Expand Up @@ -33,11 +33,11 @@
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

Expand Down Expand Up @@ -103,6 +103,31 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.dostonhamrakulov;
package io.github.dostonhamrakulov;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.dostonhamrakulov;
package io.github.dostonhamrakulov;

import org.telegram.telegrambots.meta.api.objects.Update;
import org.telegram.telegrambots.meta.api.objects.replykeyboard.InlineKeyboardMarkup;
Expand All @@ -12,11 +12,6 @@
import java.util.List;
import java.util.Map;

import static com.github.dostonhamrakulov.InlineCalendarCommandUtil.CALENDAR_COMMAND_DATE;
import static com.github.dostonhamrakulov.InlineCalendarCommandUtil.CALENDAR_COMMAND_IGNORE;
import static com.github.dostonhamrakulov.InlineCalendarCommandUtil.CALENDAR_COMMAND_NAVIGATION;
import static com.github.dostonhamrakulov.InlineCalendarCommandUtil.CALENDAR_COMMAND_PREFIX;

/**
* Inline calendar builder
* @author Doston Hamrakulov
Expand Down Expand Up @@ -73,7 +68,7 @@ public synchronized InlineKeyboardMarkup build(final Update update) {
for (final String weekDay: getWeekDays()) {
final InlineKeyboardButton in = new InlineKeyboardButton();
in.setText(weekDay);
in.setCallbackData(CALENDAR_COMMAND_PREFIX + CALENDAR_COMMAND_IGNORE);
in.setCallbackData(InlineCalendarCommandUtil.CALENDAR_COMMAND_PREFIX + InlineCalendarCommandUtil.CALENDAR_COMMAND_IGNORE);
inlineKeyboardButtons.add(in);
}

Expand All @@ -87,7 +82,7 @@ public synchronized InlineKeyboardMarkup build(final Update update) {
for (int i = 0; i < weekDaysCounter; i++) {
final InlineKeyboardButton in = new InlineKeyboardButton();
in.setText(" ");
in.setCallbackData(CALENDAR_COMMAND_PREFIX + CALENDAR_COMMAND_IGNORE);
in.setCallbackData(InlineCalendarCommandUtil.CALENDAR_COMMAND_PREFIX + InlineCalendarCommandUtil.CALENDAR_COMMAND_IGNORE);
inlineKeyboardButtons.add(in);
}

Expand All @@ -97,7 +92,7 @@ public synchronized InlineKeyboardMarkup build(final Update update) {
for (int i = 1; i <= daysOfCurrentMonth; i++) {
final InlineKeyboardButton in = new InlineKeyboardButton();
in.setText("" + i);
in.setCallbackData(CALENDAR_COMMAND_PREFIX + CALENDAR_COMMAND_DATE + DateTimeUtil.convertToString(LocalDate.of(dateForCalendar.getYear(), dateForCalendar.getMonth(), i)));
in.setCallbackData(InlineCalendarCommandUtil.CALENDAR_COMMAND_PREFIX + InlineCalendarCommandUtil.CALENDAR_COMMAND_DATE + DateTimeUtil.convertToString(LocalDate.of(dateForCalendar.getYear(), dateForCalendar.getMonth(), i)));
inlineKeyboardButtons.add(in);
weekDaysCounter += 1;

Expand All @@ -115,7 +110,7 @@ public synchronized InlineKeyboardMarkup build(final Update update) {
for (int i = 0; i < remainingEmptyDays; i++) {
final InlineKeyboardButton in = new InlineKeyboardButton();
in.setText(" ");
in.setCallbackData(CALENDAR_COMMAND_PREFIX + CALENDAR_COMMAND_IGNORE);
in.setCallbackData(InlineCalendarCommandUtil.CALENDAR_COMMAND_PREFIX + InlineCalendarCommandUtil.CALENDAR_COMMAND_IGNORE);
inlineKeyboardButtons.add(in);
}

Expand All @@ -127,7 +122,7 @@ public synchronized InlineKeyboardMarkup build(final Update update) {

InlineKeyboardButton in = new InlineKeyboardButton();
in.setText("<<");
in.setCallbackData(CALENDAR_COMMAND_PREFIX + CALENDAR_COMMAND_NAVIGATION + DateTimeUtil.convertToString(dateForCalendar.minusMonths(1)));
in.setCallbackData(InlineCalendarCommandUtil.CALENDAR_COMMAND_PREFIX + InlineCalendarCommandUtil.CALENDAR_COMMAND_NAVIGATION + DateTimeUtil.convertToString(dateForCalendar.minusMonths(1)));
inlineKeyboardButtons.add(in);

in = new InlineKeyboardButton();
Expand All @@ -138,12 +133,12 @@ public synchronized InlineKeyboardMarkup build(final Update update) {
in.setText(this.months.get(dateForCalendar.getMonth()).substring(0, 3) + ", " + dateForCalendar.getYear());
}

in.setCallbackData(CALENDAR_COMMAND_PREFIX + CALENDAR_COMMAND_IGNORE + dateForCalendar.getMonth().name());
in.setCallbackData(InlineCalendarCommandUtil.CALENDAR_COMMAND_PREFIX + InlineCalendarCommandUtil.CALENDAR_COMMAND_IGNORE + dateForCalendar.getMonth().name());
inlineKeyboardButtons.add(in);

in = new InlineKeyboardButton();
in.setText(">>");
in.setCallbackData(CALENDAR_COMMAND_PREFIX + CALENDAR_COMMAND_NAVIGATION + DateTimeUtil.convertToString(dateForCalendar.plusMonths(1)));
in.setCallbackData(InlineCalendarCommandUtil.CALENDAR_COMMAND_PREFIX + InlineCalendarCommandUtil.CALENDAR_COMMAND_NAVIGATION + DateTimeUtil.convertToString(dateForCalendar.plusMonths(1)));
inlineKeyboardButtons.add(in);
rows.add(inlineKeyboardButtons);
inlineKeyboardMarkup.setKeyboard(rows);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.dostonhamrakulov;
package io.github.dostonhamrakulov;

import org.telegram.telegrambots.meta.api.objects.Update;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.dostonhamrakulov;
package io.github.dostonhamrakulov;

import org.junit.jupiter.api.Test;

Expand Down

0 comments on commit 22fd78b

Please sign in to comment.