From bc7bca1e80a697ad90f9f197188c618cbb139ff4 Mon Sep 17 00:00:00 2001 From: yaansz Date: Fri, 27 Oct 2023 20:55:13 -0300 Subject: [PATCH 1/5] feat: Checking DB Rows to Remove Empty Rooms in Startup --- .../capivara/config/SpringConfig.java | 5 +-- .../softawii/capivara/core/DroneManager.java | 42 +++++++++++++++++-- .../softawii/capivara/core/VoiceManager.java | 30 ++++++++++++- .../listeners/events/VoiceEvents.java | 8 +++- .../repository/VoiceDroneRepository.java | 2 + .../capivara/services/VoiceDroneService.java | 5 +++ .../capivara/services/VoiceHiveService.java | 4 ++ 7 files changed, 87 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/softawii/capivara/config/SpringConfig.java b/src/main/java/com/softawii/capivara/config/SpringConfig.java index 21b60f1..ca163d3 100644 --- a/src/main/java/com/softawii/capivara/config/SpringConfig.java +++ b/src/main/java/com/softawii/capivara/config/SpringConfig.java @@ -62,15 +62,12 @@ public LocalContainerEntityManagerFactoryBean entityManagerFactory() { } @Bean - public JDA jda(VoiceEvents voiceEvents) { + public JDA jda() { JDA jda; try { JDABuilder builder = JDABuilder.create(discordToken, GatewayIntent.GUILD_MEMBERS, GatewayIntent.GUILD_VOICE_STATES, GatewayIntent.GUILD_EMOJIS_AND_STICKERS, GatewayIntent.GUILD_PRESENCES); builder.setMemberCachePolicy(MemberCachePolicy.ALL); builder.enableCache(CacheFlag.EMOJI, CacheFlag.ROLE_TAGS, CacheFlag.MEMBER_OVERRIDES, CacheFlag.STICKER); - builder.addEventListeners( - voiceEvents - ); jda = builder.build(); jda.awaitReady(); } catch (InterruptedException e) { diff --git a/src/main/java/com/softawii/capivara/core/DroneManager.java b/src/main/java/com/softawii/capivara/core/DroneManager.java index db89d80..dc3cb5e 100644 --- a/src/main/java/com/softawii/capivara/core/DroneManager.java +++ b/src/main/java/com/softawii/capivara/core/DroneManager.java @@ -12,6 +12,7 @@ import com.softawii.capivara.utils.Utils; import com.softawii.curupira.exceptions.MissingPermissionsException; import net.dv8tion.jda.api.EmbedBuilder; +import net.dv8tion.jda.api.JDA; import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.entities.*; import net.dv8tion.jda.api.entities.channel.ChannelType; @@ -45,6 +46,7 @@ public class DroneManager { private final Logger LOGGER = LogManager.getLogger(VoiceManager.class); private final VoiceDroneService voiceDroneService; private final VoiceHiveService voiceHiveService; + private final JDA jda; private final String renameDrone = "drone-manager-rename"; private final String limitDrone = "drone-manager-limit"; @@ -53,10 +55,14 @@ public class DroneManager { private final Pattern digdinRegex; - public DroneManager(VoiceDroneService voiceDroneService, VoiceHiveService voiceHiveService) { + public DroneManager(JDA jda, VoiceDroneService voiceDroneService, VoiceHiveService voiceHiveService) { this.voiceDroneService = voiceDroneService; this.voiceHiveService = voiceHiveService; + this.jda = jda; this.digdinRegex = Pattern.compile("(?\\w+mente).+(Digdin)"); + + // Checking if some channel is pending + checkEmptyDrones(); } public boolean canInteract(VoiceChannel channel, Member member) throws KeyNotFoundException { @@ -205,7 +211,12 @@ public void checkToDeleteTemporary(VoiceChannel channel, Member member, boolean int online = channel.getMembers().size(); TextChannel textChannel = channel.getGuild().getTextChannelById(drone.getChatId()); - if (online == 0) { + if (wasDeleted) { + voiceDroneService.destroy(snowflakeId); + if (textChannel != null) { + textChannel.delete().submit(); + } + } else if (online == 0) { voiceDroneService.destroy(snowflakeId); if (textChannel != null) { @@ -213,7 +224,7 @@ public void checkToDeleteTemporary(VoiceChannel channel, Member member, boolean } else { channel.delete().submit(); } - } else if (member != null && member.getIdLong() == drone.getOwnerId()) { + } else if (member == null || member.getIdLong() == drone.getOwnerId()) { // Election Mode! MessageEmbed embed = claimChat(); Button claim = Button.success(VoiceGroup.Dynamic.droneClaim, "Claim"); @@ -501,4 +512,29 @@ public void claimDrone(Guild guild, MessageChannelUnion channel, Member member) voiceDroneService.update(drone); createControlPanel(voiceChannel); } + + public void checkEmptyDrones() { + LOGGER.debug("Checking current hives and drones..."); + // Checking if some channel needs to be removed + this.voiceDroneService.findAll().forEach(drone -> { + VoiceChannel channel = this.jda.getVoiceChannelById(drone.getChannelId()); + TextChannel text = null; + + if(drone.getChatId() != 0L) text = this.jda.getTextChannelById(drone.getChatId()); + + if (channel == null) { + try { + LOGGER.info("Removing drone from DB: {}", drone.getChannelId()); + voiceDroneService.destroy(drone.getChannelId()); + if(text != null) text.delete().submit(); + } catch (KeyNotFoundException e) { + // Ok + } + } else { + Optional ownerOpt = channel.getMembers().stream().filter(member -> member.getIdLong() == drone.getOwnerId()).findFirst(); + LOGGER.info("Checking to remove drone: {}", drone.getChannelId()); + if(ownerOpt.isEmpty()) this.checkToDeleteTemporary(channel, null, false); + } + }); + } } diff --git a/src/main/java/com/softawii/capivara/core/VoiceManager.java b/src/main/java/com/softawii/capivara/core/VoiceManager.java index e439eb0..b2f768b 100644 --- a/src/main/java/com/softawii/capivara/core/VoiceManager.java +++ b/src/main/java/com/softawii/capivara/core/VoiceManager.java @@ -5,6 +5,7 @@ import com.softawii.capivara.exceptions.KeyNotFoundException; import com.softawii.capivara.services.VoiceHiveService; import com.softawii.capivara.utils.Utils; +import net.dv8tion.jda.api.JDA; import net.dv8tion.jda.api.entities.channel.concrete.Category; import net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel; import net.dv8tion.jda.api.events.interaction.ModalInteractionEvent; @@ -30,10 +31,12 @@ public class VoiceManager { public static final String configModal_fieldStreaming = "set-streaming"; public static final String configModal_createText = "set-text"; private final VoiceHiveService voiceHiveService; + private final JDA jda; private final Logger LOGGER = LogManager.getLogger(VoiceManager.class); - public VoiceManager(VoiceHiveService voiceHiveService) { + public VoiceManager(JDA jda, VoiceHiveService voiceHiveService) { this.voiceHiveService = voiceHiveService; + this.jda = jda; } public boolean isDynamicCategory(Category category) { @@ -126,4 +129,29 @@ else if (mapping.getId().equals(configModal_createText)) return voiceHive; } + + public void checkRemovedHives() { + this.voiceHiveService.findAll().forEach(voiceHive -> { + Category category = this.jda.getCategoryById(voiceHive.getCategoryId()); + if (category == null) { + try { + LOGGER.info("Deleting removed hive 1: {}", voiceHive.getCategoryId()); + voiceHiveService.destroy(voiceHive.getCategoryId()); + } catch (KeyNotFoundException e) { + LOGGER.debug("Key not found, ignoring..."); + } + } else { + VoiceChannel channel = this.jda.getVoiceChannelById(voiceHive.getVoiceId()); + + if(channel == null || channel.getParentCategoryIdLong() != voiceHive.getCategoryId()) { + try { + LOGGER.info("Deleting removed hive 2: {}", voiceHive.getCategoryId()); + voiceHiveService.destroy(voiceHive.getCategoryId()); + } catch (KeyNotFoundException e) { + LOGGER.debug("Key not found, ignoring..."); + } + } + } + }); + } } diff --git a/src/main/java/com/softawii/capivara/listeners/events/VoiceEvents.java b/src/main/java/com/softawii/capivara/listeners/events/VoiceEvents.java index ca4465b..c3309a9 100644 --- a/src/main/java/com/softawii/capivara/listeners/events/VoiceEvents.java +++ b/src/main/java/com/softawii/capivara/listeners/events/VoiceEvents.java @@ -4,6 +4,7 @@ import com.softawii.capivara.core.VoiceManager; import com.softawii.capivara.entity.VoiceHive; import com.softawii.capivara.exceptions.KeyNotFoundException; +import net.dv8tion.jda.api.JDA; import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.channel.ChannelType; import net.dv8tion.jda.api.entities.channel.concrete.Category; @@ -27,10 +28,15 @@ public class VoiceEvents extends ListenerAdapter { private final DroneManager droneManager; private final Logger LOGGER = LogManager.getLogger(VoiceEvents.class); + private final JDA jda; - public VoiceEvents(VoiceManager voiceManager, DroneManager droneManager) { + public VoiceEvents(JDA jda, VoiceManager voiceManager, DroneManager droneManager) { this.voiceManager = voiceManager; this.droneManager = droneManager; + this.jda = jda; + this.jda.addEventListener(this); + this.droneManager.checkEmptyDrones(); + this.voiceManager.checkRemovedHives(); } //region Voice Events diff --git a/src/main/java/com/softawii/capivara/repository/VoiceDroneRepository.java b/src/main/java/com/softawii/capivara/repository/VoiceDroneRepository.java index 07fbbd4..328fb19 100644 --- a/src/main/java/com/softawii/capivara/repository/VoiceDroneRepository.java +++ b/src/main/java/com/softawii/capivara/repository/VoiceDroneRepository.java @@ -3,6 +3,8 @@ import com.softawii.capivara.entity.VoiceDrone; import org.springframework.data.jpa.repository.JpaRepository; +import java.util.List; + public interface VoiceDroneRepository extends JpaRepository { VoiceDrone findByChatId(Long chatId); diff --git a/src/main/java/com/softawii/capivara/services/VoiceDroneService.java b/src/main/java/com/softawii/capivara/services/VoiceDroneService.java index 10aee7a..1234099 100644 --- a/src/main/java/com/softawii/capivara/services/VoiceDroneService.java +++ b/src/main/java/com/softawii/capivara/services/VoiceDroneService.java @@ -6,6 +6,7 @@ import org.springframework.stereotype.Service; import javax.management.openmbean.KeyAlreadyExistsException; +import java.util.List; @Service public class VoiceDroneService { @@ -42,4 +43,8 @@ public VoiceDrone find(Long snowflakeId) throws KeyNotFoundException { public VoiceDrone findByChatId(Long snowflakeId) throws KeyNotFoundException { return voiceDroneRepository.findByChatId(snowflakeId); } + + public List findAll() { + return voiceDroneRepository.findAll(); + } } diff --git a/src/main/java/com/softawii/capivara/services/VoiceHiveService.java b/src/main/java/com/softawii/capivara/services/VoiceHiveService.java index 44dca5e..80489cd 100644 --- a/src/main/java/com/softawii/capivara/services/VoiceHiveService.java +++ b/src/main/java/com/softawii/capivara/services/VoiceHiveService.java @@ -48,4 +48,8 @@ public VoiceHive find(Long SnowflakeId) throws KeyNotFoundException { Optional voiceHive = voiceHiveRepository.findById(SnowflakeId); return voiceHive.orElseThrow(KeyNotFoundException::new); } + + public List findAll() { + return voiceHiveRepository.findAll(); + } } From 0491275295b7f3d0a95af6b44728844ae3a9365f Mon Sep 17 00:00:00 2001 From: yaansz Date: Fri, 27 Oct 2023 21:25:30 -0300 Subject: [PATCH 2/5] feat: Adding Pages to DB Requests --- .../softawii/capivara/core/DroneManager.java | 53 ++++++++++++------- .../softawii/capivara/core/VoiceManager.java | 46 ++++++++++------ 2 files changed, 63 insertions(+), 36 deletions(-) diff --git a/src/main/java/com/softawii/capivara/core/DroneManager.java b/src/main/java/com/softawii/capivara/core/DroneManager.java index dc3cb5e..7e8a36e 100644 --- a/src/main/java/com/softawii/capivara/core/DroneManager.java +++ b/src/main/java/com/softawii/capivara/core/DroneManager.java @@ -31,6 +31,9 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.Nullable; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Component; import java.awt.*; @@ -515,26 +518,36 @@ public void claimDrone(Guild guild, MessageChannelUnion channel, Member member) public void checkEmptyDrones() { LOGGER.debug("Checking current hives and drones..."); - // Checking if some channel needs to be removed - this.voiceDroneService.findAll().forEach(drone -> { - VoiceChannel channel = this.jda.getVoiceChannelById(drone.getChannelId()); - TextChannel text = null; - - if(drone.getChatId() != 0L) text = this.jda.getTextChannelById(drone.getChatId()); - - if (channel == null) { - try { - LOGGER.info("Removing drone from DB: {}", drone.getChannelId()); - voiceDroneService.destroy(drone.getChannelId()); - if(text != null) text.delete().submit(); - } catch (KeyNotFoundException e) { - // Ok - } - } else { - Optional ownerOpt = channel.getMembers().stream().filter(member -> member.getIdLong() == drone.getOwnerId()).findFirst(); - LOGGER.info("Checking to remove drone: {}", drone.getChannelId()); - if(ownerOpt.isEmpty()) this.checkToDeleteTemporary(channel, null, false); + Pageable request = PageRequest.of(0, 100); + Page page = this.voiceDroneService.findAll(request); + + while (page.hasContent()) { + LOGGER.debug("Checking page: {}", request.getPageNumber()); + page.forEach(this::checkIfDroneIsValid); + request = request.next(); + page = this.voiceDroneService.findAll(request); + } + } + + private void checkIfDroneIsValid(VoiceDrone drone) { + LOGGER.debug("Checking drone: {}", drone.getChannelId()); + VoiceChannel channel = this.jda.getVoiceChannelById(drone.getChannelId()); + TextChannel text = null; + + if(drone.getChatId() != 0L) text = this.jda.getTextChannelById(drone.getChatId()); + + if (channel == null) { + try { + LOGGER.info("Removing drone from DB: {}", drone.getChannelId()); + voiceDroneService.destroy(drone.getChannelId()); + if(text != null) text.delete().submit(); + } catch (KeyNotFoundException e) { + // Ok } - }); + } else { + Optional ownerOpt = channel.getMembers().stream().filter(member -> member.getIdLong() == drone.getOwnerId()).findFirst(); + LOGGER.info("Checking to remove drone: {}", drone.getChannelId()); + if(ownerOpt.isEmpty()) this.checkToDeleteTemporary(channel, null, false); + } } } diff --git a/src/main/java/com/softawii/capivara/core/VoiceManager.java b/src/main/java/com/softawii/capivara/core/VoiceManager.java index b2f768b..5b4ced1 100644 --- a/src/main/java/com/softawii/capivara/core/VoiceManager.java +++ b/src/main/java/com/softawii/capivara/core/VoiceManager.java @@ -15,6 +15,9 @@ import net.dv8tion.jda.api.interactions.modals.ModalMapping; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Component; import java.util.List; @@ -131,27 +134,38 @@ else if (mapping.getId().equals(configModal_createText)) } public void checkRemovedHives() { - this.voiceHiveService.findAll().forEach(voiceHive -> { - Category category = this.jda.getCategoryById(voiceHive.getCategoryId()); - if (category == null) { + Pageable request = PageRequest.of(0, 100); + Page page = this.voiceHiveService.findAll(request); + + while (page.hasContent()) { + LOGGER.debug("Checking page: {}", request.getPageNumber()); + page.forEach(this::checkIfHiveIsStillValid); + request = request.next(); + page = this.voiceHiveService.findAll(request); + } + } + + public void checkIfHiveIsStillValid(VoiceHive voiceHive) { + LOGGER.info("Checking if hive is still valid: {}", voiceHive.getCategoryId()); + Category category = this.jda.getCategoryById(voiceHive.getCategoryId()); + if (category == null) { + try { + LOGGER.info("Deleting removed hive 1: {}", voiceHive.getCategoryId()); + voiceHiveService.destroy(voiceHive.getCategoryId()); + } catch (KeyNotFoundException e) { + LOGGER.debug("Key not found, ignoring..."); + } + } else { + VoiceChannel channel = this.jda.getVoiceChannelById(voiceHive.getVoiceId()); + + if(channel == null || channel.getParentCategoryIdLong() != voiceHive.getCategoryId()) { try { - LOGGER.info("Deleting removed hive 1: {}", voiceHive.getCategoryId()); + LOGGER.info("Deleting removed hive 2: {}", voiceHive.getCategoryId()); voiceHiveService.destroy(voiceHive.getCategoryId()); } catch (KeyNotFoundException e) { LOGGER.debug("Key not found, ignoring..."); } - } else { - VoiceChannel channel = this.jda.getVoiceChannelById(voiceHive.getVoiceId()); - - if(channel == null || channel.getParentCategoryIdLong() != voiceHive.getCategoryId()) { - try { - LOGGER.info("Deleting removed hive 2: {}", voiceHive.getCategoryId()); - voiceHiveService.destroy(voiceHive.getCategoryId()); - } catch (KeyNotFoundException e) { - LOGGER.debug("Key not found, ignoring..."); - } - } } - }); + } } } From 2b0ce19593b5dc16573f9cede0272e119c7c2c37 Mon Sep 17 00:00:00 2001 From: yaansz Date: Fri, 27 Oct 2023 21:27:18 -0300 Subject: [PATCH 3/5] feat: optimizing imports --- .../java/com/softawii/capivara/config/SpringConfig.java | 1 - .../softawii/capivara/listeners/events/VoiceEvents.java | 2 +- .../softawii/capivara/repository/VoiceDroneRepository.java | 2 -- .../com/softawii/capivara/services/VoiceDroneService.java | 7 ++++--- .../com/softawii/capivara/services/VoiceHiveService.java | 6 ++++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/softawii/capivara/config/SpringConfig.java b/src/main/java/com/softawii/capivara/config/SpringConfig.java index ca163d3..0835ba6 100644 --- a/src/main/java/com/softawii/capivara/config/SpringConfig.java +++ b/src/main/java/com/softawii/capivara/config/SpringConfig.java @@ -1,6 +1,5 @@ package com.softawii.capivara.config; -import com.softawii.capivara.listeners.events.VoiceEvents; import com.softawii.capivara.utils.CapivaraExceptionHandler; import com.softawii.curupira.core.Curupira; import net.dv8tion.jda.api.JDA; diff --git a/src/main/java/com/softawii/capivara/listeners/events/VoiceEvents.java b/src/main/java/com/softawii/capivara/listeners/events/VoiceEvents.java index c3309a9..cbbd82a 100644 --- a/src/main/java/com/softawii/capivara/listeners/events/VoiceEvents.java +++ b/src/main/java/com/softawii/capivara/listeners/events/VoiceEvents.java @@ -34,9 +34,9 @@ public VoiceEvents(JDA jda, VoiceManager voiceManager, DroneManager droneManager this.voiceManager = voiceManager; this.droneManager = droneManager; this.jda = jda; - this.jda.addEventListener(this); this.droneManager.checkEmptyDrones(); this.voiceManager.checkRemovedHives(); + this.jda.addEventListener(this); } //region Voice Events diff --git a/src/main/java/com/softawii/capivara/repository/VoiceDroneRepository.java b/src/main/java/com/softawii/capivara/repository/VoiceDroneRepository.java index 328fb19..07fbbd4 100644 --- a/src/main/java/com/softawii/capivara/repository/VoiceDroneRepository.java +++ b/src/main/java/com/softawii/capivara/repository/VoiceDroneRepository.java @@ -3,8 +3,6 @@ import com.softawii.capivara.entity.VoiceDrone; import org.springframework.data.jpa.repository.JpaRepository; -import java.util.List; - public interface VoiceDroneRepository extends JpaRepository { VoiceDrone findByChatId(Long chatId); diff --git a/src/main/java/com/softawii/capivara/services/VoiceDroneService.java b/src/main/java/com/softawii/capivara/services/VoiceDroneService.java index 1234099..5905950 100644 --- a/src/main/java/com/softawii/capivara/services/VoiceDroneService.java +++ b/src/main/java/com/softawii/capivara/services/VoiceDroneService.java @@ -3,10 +3,11 @@ import com.softawii.capivara.entity.VoiceDrone; import com.softawii.capivara.exceptions.KeyNotFoundException; import com.softawii.capivara.repository.VoiceDroneRepository; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import javax.management.openmbean.KeyAlreadyExistsException; -import java.util.List; @Service public class VoiceDroneService { @@ -44,7 +45,7 @@ public VoiceDrone findByChatId(Long snowflakeId) throws KeyNotFoundException { return voiceDroneRepository.findByChatId(snowflakeId); } - public List findAll() { - return voiceDroneRepository.findAll(); + public Page findAll(Pageable request) { + return voiceDroneRepository.findAll(request); } } diff --git a/src/main/java/com/softawii/capivara/services/VoiceHiveService.java b/src/main/java/com/softawii/capivara/services/VoiceHiveService.java index 80489cd..7a66c1d 100644 --- a/src/main/java/com/softawii/capivara/services/VoiceHiveService.java +++ b/src/main/java/com/softawii/capivara/services/VoiceHiveService.java @@ -4,6 +4,8 @@ import com.softawii.capivara.exceptions.ExistingDynamicCategoryException; import com.softawii.capivara.exceptions.KeyNotFoundException; import com.softawii.capivara.repository.VoiceHiveRepository; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import java.util.List; @@ -49,7 +51,7 @@ public VoiceHive find(Long SnowflakeId) throws KeyNotFoundException { return voiceHive.orElseThrow(KeyNotFoundException::new); } - public List findAll() { - return voiceHiveRepository.findAll(); + public Page findAll(Pageable request) { + return voiceHiveRepository.findAll(request); } } From 1a3e6d45777a86f442b93e90f04a3fc0a33ad279 Mon Sep 17 00:00:00 2001 From: yaansz Date: Fri, 27 Oct 2023 21:28:32 -0300 Subject: [PATCH 4/5] feat: adding key not found log --- src/main/java/com/softawii/capivara/core/DroneManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/softawii/capivara/core/DroneManager.java b/src/main/java/com/softawii/capivara/core/DroneManager.java index 7e8a36e..b1db2b7 100644 --- a/src/main/java/com/softawii/capivara/core/DroneManager.java +++ b/src/main/java/com/softawii/capivara/core/DroneManager.java @@ -542,7 +542,7 @@ private void checkIfDroneIsValid(VoiceDrone drone) { voiceDroneService.destroy(drone.getChannelId()); if(text != null) text.delete().submit(); } catch (KeyNotFoundException e) { - // Ok + LOGGER.info("Key not found, ignoring..."); } } else { Optional ownerOpt = channel.getMembers().stream().filter(member -> member.getIdLong() == drone.getOwnerId()).findFirst(); From caecc80e2f3917c06731f4707421a2d094f89706 Mon Sep 17 00:00:00 2001 From: yaansz Date: Fri, 27 Oct 2023 21:31:02 -0300 Subject: [PATCH 5/5] feat: removing unused dependency --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index 6f663be..22306e8 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,6 @@ dependencies { implementation("com.github.Softawii:curupira:v0.3.0") implementation("com.github.Softawii:curupira:v0.3.0:all") - implementation("com.github.minndevelopment:emoji-java:master-SNAPSHOT") } tasks.register('deploy') {