Compare commits

...

14 Commits

Author SHA1 Message Date
Struchkov Mark ef189e9baa
update dependencies and cicd
continuous-integration/drone/push Build is passing Details
2024-01-19 19:49:28 +03:00
Struchkov Mark 4a93ab5274
[maven-release-plugin] prepare for next development iteration
continuous-integration/drone/push Build is passing Details
2023-04-30 10:33:46 +03:00
Struchkov Mark 88e4a82372
[maven-release-plugin] prepare release v.0.0.57 2023-04-30 10:33:45 +03:00
Struchkov Mark f616dd30ba
prerelease 2023-04-30 10:33:34 +03:00
Struchkov Mark ef605cf098
Удалил использование PersonSetting 2023-04-30 10:32:48 +03:00
Struchkov Mark 084f39be0b
Удалил использование PersonSetting 2023-04-24 10:05:39 +03:00
Struchkov Mark 5e433b76ef
Подготовка релиза 2023-04-24 10:04:25 +03:00
Struchkov Mark 015c3246a7
Актуализация версии
continuous-integration/drone/push Build is passing Details
2023-04-22 17:24:33 +03:00
Struchkov Mark 502767a514
Актуализация версии
continuous-integration/drone/push Build is passing Details
2023-04-10 10:12:44 +03:00
Struchkov Mark 9e5a8756d4
[maven-release-plugin] prepare for next development iteration 2023-04-09 22:07:00 +03:00
Struchkov Mark 1da4bda2f4
[maven-release-plugin] prepare release v.0.0.55 2023-04-09 22:06:59 +03:00
Struchkov Mark 16b94d8508
pre release 2023-04-09 22:06:45 +03:00
Struchkov Mark 030b62e179
Актуализировал версии
continuous-integration/drone/push Build is passing Details
2023-04-09 11:24:37 +03:00
Struchkov Mark 6e11f53a8c
[maven-release-plugin] prepare for next development iteration
continuous-integration/drone/push Build is passing Details
2023-03-29 01:22:18 +03:00
4 changed files with 26 additions and 49 deletions

View File

@ -13,9 +13,8 @@ volumes:
path: /drone/volume/m2
steps:
- name: publish
image: maven:3.8.5-openjdk-17
image: hub.docker.struchkov.dev/maven:3.9.5-eclipse-temurin-17-alpine
privileged: true
volumes:
- name: m2
@ -42,9 +41,8 @@ volumes:
path: /drone/volume/m2
steps:
- name: publish maven central
image: maven:3.8.5-openjdk-17
image: hub.docker.struchkov.dev/maven:3.9.5-eclipse-temurin-17-alpine
privileged: true
volumes:
- name: m2
@ -57,6 +55,7 @@ steps:
GPG_PASSPHRASE:
from_secret: GPG_PASSPHRASE
commands:
- apk add --no-cache gnupg
- echo "$GPG_PRIVATE_KEY" >> gpg.key
- echo "$MAVEN_SETTINGS" >> maven-settings.xml
- gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key
@ -77,9 +76,8 @@ volumes:
path: /drone/volume/m2
steps:
- name: publish struchkov nexus
image: maven:3.8.5-openjdk-17
image: hub.docker.struchkov.dev/maven:3.9.5-eclipse-temurin-17-alpine
privileged: true
volumes:
- name: m2
@ -92,6 +90,7 @@ steps:
GPG_PASSPHRASE:
from_secret: GPG_PASSPHRASE
commands:
- apk add --no-cache gnupg
- echo "$GPG_PRIVATE_KEY" >> gpg.key
- echo "$MAVEN_SETTINGS" >> maven-settings.xml
- gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key
@ -99,6 +98,6 @@ steps:
---
kind: signature
hmac: 6aa5185200940abe95b0bb1c4cb7fc958faee27e88fb3ae4e4694b9a2da871b0
hmac: 66796c2b300a4fe5e185561985fb867cb7f0ce0ab98babd264a4bf2ff6246228
...

20
pom.xml
View File

@ -10,7 +10,7 @@
<groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-bot-spring-boot-starter</artifactId>
<version>0.0.54</version>
<version>1.0.0-SNAPSHOT</version>
<properties>
<java.version>17</java.version>
@ -19,21 +19,23 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<godfather.version>0.0.55</godfather.version>
<telegram.bot.version>0.0.54</telegram.bot.version>
<!-- https://mvnrepository.com/artifact/dev.struchkov.godfather/bot-data-simple -->
<godfather.version>1.2.0</godfather.version>
<!-- https://mvnrepository.com/artifact/dev.struchkov.godfather.telegram/telegram-consumer-simple -->
<telegram.bot.version>1.4.0</telegram.bot.version>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
<plugin.maven.compiler.ver>3.10.1</plugin.maven.compiler.ver>
<plugin.maven.compiler.ver>3.12.1</plugin.maven.compiler.ver>
<!-- https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin -->
<plugin.nexus.staging.ver>1.6.13</plugin.nexus.staging.ver>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
<plugin.maven.source.ver>3.2.1</plugin.maven.source.ver>
<plugin.maven.source.ver>3.3.0</plugin.maven.source.ver>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
<plugin.maven.javadoc.ver>3.5.0</plugin.maven.javadoc.ver>
<plugin.maven.javadoc.ver>3.6.3</plugin.maven.javadoc.ver>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
<plugin.maven.gpg.ver>3.0.1</plugin.maven.gpg.ver>
<plugin.maven.gpg.ver>3.1.0</plugin.maven.gpg.ver>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-release-plugin -->
<plugin.maven.release.ver>3.0.0-M7</plugin.maven.release.ver>
<plugin.maven.release.ver>3.0.1</plugin.maven.release.ver>
</properties>
<dependencies>
@ -297,7 +299,7 @@
<url>https://git.struchkov.dev/Godfather-Bots/telegram-bot-spring-boot-starter</url>
<developerConnection>scm:git:https://git.struchkov.dev/Godfather-Bots/telegram-bot-spring-boot-starter.git
</developerConnection>
<tag>v.0.0.54</tag>
<tag>v.0.0.56</tag>
</scm>
<developers>

View File

@ -2,13 +2,10 @@ package dev.struchkov.godfather.telegram.starter.config;
import dev.struchkov.godfather.main.domain.content.ChatMail;
import dev.struchkov.godfather.main.domain.content.Mail;
import dev.struchkov.godfather.simple.context.repository.PersonSettingRepository;
import dev.struchkov.godfather.simple.context.repository.StorylineRepository;
import dev.struchkov.godfather.simple.context.repository.UnitPointerRepository;
import dev.struchkov.godfather.simple.context.service.ErrorHandler;
import dev.struchkov.godfather.simple.context.service.EventDispatching;
import dev.struchkov.godfather.simple.context.service.EventHandler;
import dev.struchkov.godfather.simple.context.service.PersonSettingService;
import dev.struchkov.godfather.simple.context.service.UnitPointerService;
import dev.struchkov.godfather.simple.core.EventDispatchingImpl;
import dev.struchkov.godfather.simple.core.action.AnswerCheckAction;
@ -17,7 +14,6 @@ import dev.struchkov.godfather.simple.core.action.AnswerTextChatMailAction;
import dev.struchkov.godfather.simple.core.action.AnswerTextMailAction;
import dev.struchkov.godfather.simple.core.provider.ChatStoryLineHandler;
import dev.struchkov.godfather.simple.core.provider.PersonStoryLineHandler;
import dev.struchkov.godfather.simple.core.service.PersonSettingServiceImpl;
import dev.struchkov.godfather.simple.core.service.StorylineMailService;
import dev.struchkov.godfather.simple.core.service.StorylineService;
import dev.struchkov.godfather.simple.core.service.UnitPointerServiceImpl;
@ -74,12 +70,6 @@ public class TelegramBotAutoconfiguration {
return new UnitPointerServiceImpl(unitPointerRepository);
}
@Bean
@ConditionalOnBean(PersonSettingRepository.class)
public PersonSettingService personSettingService(PersonSettingRepository personSettingRepository) {
return new PersonSettingServiceImpl(personSettingRepository);
}
@Bean
@ConditionalOnBean(TelegramConnect.class)
public TelegramSending sending(
@ -97,29 +87,25 @@ public class TelegramBotAutoconfiguration {
}
@Bean("mailStorylineService")
@ConditionalOnBean(value = {UnitPointerService.class, StorylineRepository.class, PersonUnitConfiguration.class})
@ConditionalOnBean(value = {UnitPointerService.class, PersonUnitConfiguration.class})
public StorylineService<Mail> mailStorylineService(
UnitPointerService unitPointerService,
StorylineRepository storylineRepository,
List<PersonUnitConfiguration> personUnitConfigurations
) {
return new StorylineMailService<>(
unitPointerService,
storylineRepository,
new ArrayList<>(personUnitConfigurations)
);
}
@Bean("chatMailStorylineService")
@ConditionalOnBean(value = {UnitPointerService.class, StorylineRepository.class, ChatUnitConfiguration.class})
@ConditionalOnBean(value = {UnitPointerService.class, ChatUnitConfiguration.class})
public StorylineService<ChatMail> chatMailStorylineService(
UnitPointerService unitPointerService,
StorylineRepository storylineRepository,
List<ChatUnitConfiguration> chatUnitConfigurations
) {
return new StorylineMailService<>(
unitPointerService,
storylineRepository,
new ArrayList<>(chatUnitConfigurations)
);
}
@ -128,14 +114,13 @@ public class TelegramBotAutoconfiguration {
@ConditionalOnBean(name = "chatMailStorylineService")
public ChatMailAutoresponderTelegram chatMailAutoresponderTelegram(
@Qualifier(AUTORESPONDER_EXECUTORS_SERVICE) ObjectProvider<ExecutorService> executorServiceProvider,
PersonSettingService personSettingService,
ObjectProvider<ErrorHandler> errorHandlerProvider,
ObjectProvider<AnswerTextChatMailAction> answerTextActionProvider,
TelegramSending telegramSending,
StorylineService<ChatMail> storylineService
) {
final ChatMailAutoresponderTelegram autoresponder = new ChatMailAutoresponderTelegram(personSettingService, storylineService);
final ChatMailAutoresponderTelegram autoresponder = new ChatMailAutoresponderTelegram(storylineService);
autoresponder.registrationActionUnit(new AnswerCheckAction(telegramSending));
autoresponder.registrationActionUnit(new AnswerSaveAction<>());
@ -164,13 +149,12 @@ public class TelegramBotAutoconfiguration {
public MailAutoresponderTelegram messageAutoresponderTelegram(
@Qualifier(AUTORESPONDER_EXECUTORS_SERVICE) ObjectProvider<ExecutorService> executorServiceProvider,
TelegramSending sending,
PersonSettingService personSettingService,
ObjectProvider<ErrorHandler> errorHandlerProvider,
ObjectProvider<AnswerTextMailAction> answerTextActionProvider,
StorylineService<Mail> storylineService
) {
final MailAutoresponderTelegram autoresponder = new MailAutoresponderTelegram(personSettingService, storylineService);
final MailAutoresponderTelegram autoresponder = new MailAutoresponderTelegram(storylineService);
autoresponder.registrationActionUnit(new AnswerCheckAction(sending));
autoresponder.registrationActionUnit(new AnswerSaveAction<>());

View File

@ -1,12 +1,10 @@
package dev.struchkov.godfather.telegram.starter.config;
import dev.struchkov.godfather.simple.context.repository.PersonSettingRepository;
import dev.struchkov.godfather.simple.context.repository.StorylineContext;
import dev.struchkov.godfather.simple.context.repository.StorylineRepository;
import dev.struchkov.godfather.simple.context.repository.StorylineHistoryRepository;
import dev.struchkov.godfather.simple.context.repository.UnitPointerRepository;
import dev.struchkov.godfather.simple.core.service.StorylineContextMapImpl;
import dev.struchkov.godfather.simple.data.repository.impl.PersonSettingLocalRepository;
import dev.struchkov.godfather.simple.data.repository.impl.StorylineMapRepository;
import dev.struchkov.godfather.simple.data.repository.impl.StorylineMapHistoryRepository;
import dev.struchkov.godfather.simple.data.repository.impl.UnitPointLocalRepository;
import dev.struchkov.godfather.telegram.simple.context.repository.SenderRepository;
import dev.struchkov.godfather.telegram.simple.context.service.TelegramConnect;
@ -28,18 +26,12 @@ public class TelegramBotDataConfiguration {
return new UnitPointLocalRepository();
}
@Bean
@ConditionalOnBean(TelegramConnect.class)
@ConditionalOnMissingBean(PersonSettingRepository.class)
public PersonSettingRepository personSettingRepository() {
return new PersonSettingLocalRepository();
}
@Bean
@ConditionalOnBean(TelegramConnect.class)
@ConditionalOnMissingBean(StorylineRepository.class)
public StorylineRepository storylineRepository() {
return new StorylineMapRepository();
@ConditionalOnMissingBean(StorylineHistoryRepository.class)
public StorylineHistoryRepository storylineHistoryRepository() {
return new StorylineMapHistoryRepository();
}
@Bean