Skip to content

Commit

Permalink
Merge pull request #20 from quarkiverse/update-quarkus
Browse files Browse the repository at this point in the history
Update to Quarkus 3.7
  • Loading branch information
gsmet authored Feb 10, 2024
2 parents bea476f + 1588171 commit 6255f8d
Show file tree
Hide file tree
Showing 25 changed files with 146 additions and 72 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@ jobs:
if: startsWith(matrix.os, 'windows')

- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
java-version: 17
cache: 'maven'

- name: Build with Maven
run: mvn -B formatter:validate verify --file pom.xml
env:
QUARKUS_DISCORD4J_TOKEN: ${{ secrets.QUARKUS_DISCORD4J_TOKEN }}
QUARKUS_DISCORD4J_GUILD_COMMANDS_TEST_GUILD_ID: ${{ secrets.QUARKUS_DISCORD4J_GUILD_COMMANDS_TEST_GUILD_ID }}
4 changes: 3 additions & 1 deletion .github/workflows/quarkus-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ jobs:
- name: Setup and Run Tests
run: ./ecosystem-ci/setup-and-test
env:
ECOSYSTEM_CI_TOKEN: ${{ secrets.ECOSYSTEM_CI_TOKEN }}
ECOSYSTEM_CI_TOKEN: ${{ secrets.ECOSYSTEM_CI_TOKEN }}
QUARKUS_DISCORD4J_TOKEN: ${{ secrets.QUARKUS_DISCORD4J_TOKEN }}
QUARKUS_DISCORD4J_GUILD_COMMANDS_TEST_GUILD_ID: ${{ secrets.QUARKUS_DISCORD4J_GUILD_COMMANDS_TEST_GUILD_ID }}
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 17
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
Expand All @@ -58,6 +58,8 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
QUARKUS_DISCORD4J_TOKEN: ${{ secrets.QUARKUS_DISCORD4J_TOKEN }}
QUARKUS_DISCORD4J_GUILD_COMMANDS_TEST_GUILD_ID: ${{ secrets.QUARKUS_DISCORD4J_GUILD_COMMANDS_TEST_GUILD_ID }}

- name: Adjust tag for documentation changes
run: |
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
release.properties
release.properties

# Environment
.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import java.io.IOException;

import javax.inject.Inject;
import jakarta.inject.Inject;

import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.jboss.logging.Logger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
quarkus.discord4j.guild-commands.test.overwrite-on-start=true
quarkus.discord4j.guild-commands.test.overwrite-on-start=true
quarkus.discord4j.guild-commands.test.guild-id=
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import java.util.Optional;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;

import org.jboss.logging.Logger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import java.util.function.Predicate;
import java.util.stream.Collectors;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.event.Observes;
import jakarta.inject.Inject;

import org.jboss.logging.Logger;
import org.reactivestreams.Publisher;
Expand Down
5 changes: 5 additions & 0 deletions deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
package io.quarkiverse.discord4j.deployment;

import static io.quarkiverse.discord4j.deployment.Discord4jDotNames.*;
import static io.quarkiverse.discord4j.deployment.Discord4jMethodDescriptors.*;
import static io.quarkiverse.discord4j.deployment.Discord4jDotNames.EVENT;
import static io.quarkiverse.discord4j.deployment.Discord4jDotNames.FLUX;
import static io.quarkiverse.discord4j.deployment.Discord4jDotNames.GATEWAY_EVENT;
import static io.quarkiverse.discord4j.deployment.Discord4jDotNames.MONO;
import static io.quarkiverse.discord4j.deployment.Discord4jDotNames.MULTI;
import static io.quarkiverse.discord4j.deployment.Discord4jDotNames.UNI;
import static io.quarkiverse.discord4j.deployment.Discord4jMethodDescriptors.FLUX_FLAT_MAP;
import static io.quarkiverse.discord4j.deployment.Discord4jMethodDescriptors.FLUX_THEN;
import static io.quarkiverse.discord4j.deployment.Discord4jMethodDescriptors.FUNCTION_APPLY;
import static io.quarkiverse.discord4j.deployment.Discord4jMethodDescriptors.GATEWAY_DISCORD_CLIENT_ON;
import static io.quarkiverse.discord4j.deployment.Discord4jMethodDescriptors.MONO_SUBSCRIBE;
import static io.quarkiverse.discord4j.deployment.Discord4jMethodDescriptors.MONO_WHEN;

import java.lang.reflect.Modifier;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collectors;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Default;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Default;

import org.jboss.jandex.*;
import org.jboss.jandex.AnnotationInstance;
import org.jboss.jandex.ClassInfo;
import org.jboss.jandex.DotName;
import org.jboss.jandex.IndexView;
import org.jboss.jandex.MethodInfo;
import org.jboss.jandex.MethodParameterInfo;
import org.jboss.jandex.Type;
import org.reactivestreams.Publisher;

import discord4j.core.DiscordClient;
Expand All @@ -23,19 +44,33 @@
import io.quarkiverse.discord4j.runtime.Discord4jRecorder;
import io.quarkiverse.discord4j.runtime.config.Discord4jConfig;
import io.quarkus.arc.Unremovable;
import io.quarkus.arc.deployment.*;
import io.quarkus.arc.deployment.AutoAddScopeBuildItem;
import io.quarkus.arc.deployment.BeanContainerBuildItem;
import io.quarkus.arc.deployment.GeneratedBeanBuildItem;
import io.quarkus.arc.deployment.GeneratedBeanGizmoAdaptor;
import io.quarkus.arc.deployment.SyntheticBeanBuildItem;
import io.quarkus.arc.processor.BuiltinScope;
import io.quarkus.arc.processor.DotNames;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.*;
import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.ExecutorBuildItem;
import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
import io.quarkus.deployment.builditem.SslNativeConfigBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageConfigBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.metrics.MetricsCapabilityBuildItem;
import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild;
import io.quarkus.gizmo.*;
import io.quarkus.gizmo.ClassCreator;
import io.quarkus.gizmo.ClassOutput;
import io.quarkus.gizmo.FieldCreator;
import io.quarkus.gizmo.MethodCreator;
import io.quarkus.gizmo.MethodDescriptor;
import io.quarkus.gizmo.ResultHandle;
import io.quarkus.jackson.spi.ClassPathJacksonModuleBuildItem;
import io.quarkus.netty.deployment.EventLoopSupplierBuildItem;
import io.quarkus.runtime.StartupEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import static io.restassured.RestAssured.get;
import static org.junit.jupiter.api.Assertions.assertEquals;

import java.util.concurrent.TimeUnit;

import org.awaitility.Awaitility;
import org.jboss.logging.Logger;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
Expand All @@ -27,8 +30,9 @@ public void testLiveReload() {
assertEquals(0, config.getLogRecords().size());

config.addSourceFile(MyBean.class);

get("/discord");
assertEquals(1, config.getLogRecords().size());
Awaitility.await().atMost(1, TimeUnit.SECONDS).until(() -> config.getLogRecords().size() == 1);
}

static class MyBean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import java.io.IOException;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import java.io.IOException;

import javax.inject.Inject;
import jakarta.inject.Inject;

import org.jboss.logging.Logger;
import org.junit.jupiter.api.AfterEach;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;

import javax.enterprise.inject.Any;
import jakarta.enterprise.inject.Any;

import org.eclipse.microprofile.health.HealthCheckResponse;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import java.util.List;

import javax.inject.Inject;
import jakarta.inject.Inject;

import org.eclipse.microprofile.metrics.Gauge;
import org.eclipse.microprofile.metrics.MetricID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;

import javax.inject.Inject;
import jakarta.inject.Inject;

import org.jboss.logging.Logger;
import org.junit.jupiter.api.AfterEach;
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/includes/attributes.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:quarkus-version: 2.14.2.Final
:quarkus-version: 3.7.2
:quarkus-discord4j-version: 0

:quarkus-guides: https://quarkus.io/guides
Expand Down
Loading

0 comments on commit 6255f8d

Please sign in to comment.