Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle avro generator in gradle #16201

Merged
merged 2 commits into from
Apr 7, 2021

Conversation

glefloch
Copy link
Member

@glefloch glefloch commented Apr 2, 2021

I saw that avro code generator was integrated in the main branch.
This add support in the gradle plugin.

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle labels Apr 2, 2021
@geoand
Copy link
Contributor

geoand commented Apr 2, 2021

Seems like you need to:

Error: Dependencies in integration-tests/gradle/pom.xml are outdated!
Error: Run update-dependencies.sh in integration-tests/gradle and add the modified pom.xml file to your commit.
Error: Process completed with exit code 1.

:)

@glefloch
Copy link
Member Author

glefloch commented Apr 2, 2021

right! I tried to do it manually but it didn't work :) I will run the script.

@glefloch
Copy link
Member Author

glefloch commented Apr 2, 2021

@famod I don't understand what is going on.. I ran the script on my machine (both new version working on mac os, and current version in a container) and the pom does not change but ci is complaining.. do you have an idea?

@famod
Copy link
Member

famod commented Apr 2, 2021

@glefloch I'll have a look!

@famod
Copy link
Member

famod commented Apr 2, 2021

I added git diff to the workflow step (something I should have done a while ago):

diff --git a/integration-tests/gradle/pom.xml b/integration-tests/gradle/pom.xml
index bfd5a86c8e..e5ab1bcb4a 100644
--- a/integration-tests/gradle/pom.xml
+++ b/integration-tests/gradle/pom.xml
@@ -94,21 +94,11 @@
             <artifactId>quarkus-resteasy</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>io.quarkus</groupId>
-            <artifactId>quarkus-resteasy-jsonb</artifactId>
-            <version>${project.version}</version>
-        </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-test-devtools</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>io.quarkus</groupId>
-            <artifactId>quarkus-vertx</artifactId>
-            <version>${project.version}</version>
-        </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-arc-deployment</artifactId>
@@ -200,32 +190,6 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>io.quarkus</groupId>
-            <artifactId>quarkus-resteasy-jsonb-deployment</artifactId>
-            <version>${project.version}</version>
-            <type>pom</type>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>*</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>io.quarkus</groupId>
-            <artifactId>quarkus-vertx-deployment</artifactId>
-            <version>${project.version}</version>
-            <type>pom</type>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>*</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
         <!-- END update-dependencies.sh -->
     </dependencies>

So in CI, the script is removing vert.x and jsonb... Does that make any sense?

@famod
Copy link
Member

famod commented Apr 2, 2021

Hm, looking at what you added/changed in this PR, I have to say I understand why the script is removing those dependencies: neither of the two deps was added to any of the build*.gradle files.

@glefloch
Copy link
Member Author

glefloch commented Apr 2, 2021

Well I think it make sense. I tried reverting all modification in the pom running the script again but, I have the same result. I will drop those new dependency manually

@famod
Copy link
Member

famod commented Apr 2, 2021

...and now I can also replicate the behavior locally. First the script didn't change anything for me locally either because I called it via integration-tests/gradle/update-dependencies.sh but that will only work after #15823 was merged!
Currently you have to cd integration-tests/gradle && ./update-dependencies.sh and on Mac you are out of luck.

@glefloch
Copy link
Member Author

glefloch commented Apr 2, 2021

I'm running it in integration-tests/gradle

@famod
Copy link
Member

famod commented Apr 2, 2021

Then you should see the same effect as in CI.

@quarkus-bot quarkus-bot bot added the area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure label Apr 2, 2021
@@ -32,7 +32,7 @@
public static final String QUARKUS_GENERATED_SOURCES = "quarkus-generated-sources";
public static final String QUARKUS_TEST_GENERATED_SOURCES = "quarkus-test-generated-sources";
// TODO dynamically load generation provider, or make them write code directly in quarkus-generated-sources
public static final String[] CODE_GENERATION_PROVIDER = new String[] { "grpc" };
public static final String[] CODE_GENERATION_PROVIDER = new String[] { "grpc", "avpr", "avsc" };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's really bad that we need this list. Can we access classpath resources in here?

@michalszynkiewicz michalszynkiewicz merged commit 2ab99f6 into quarkusio:main Apr 7, 2021
@quarkus-bot quarkus-bot bot added this to the 1.14 - main milestone Apr 7, 2021
@glefloch glefloch deleted the fix/gradle-avro branch August 19, 2021 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants