Quarkus: Gradle fails if both io.quarkus and com.google.protobuf plugins are used

Created on 9 Jun 2020  路  12Comments  路  Source: quarkusio/quarkus

Describe the bug
Gradle build fails if both io.quarkus and com.google.protobuf plugins are in use

Expected behavior
Successful build

Actual behavior
What went wrong:
A problem occurred configuring root project 'lego'.

Configuration with name 'native-testCompileProtoPath' not found.

Trying to specify any configuration starting with 'native' results in 'unexpected token: native @ '
e.g.
configurations {
native-testCompileProtoPath
}

To Reproduce
Steps to reproduce the behavior:

  1. build with the following five lines in build.gradle and nothing else.
    plugins {
    id 'java'
    id 'io.quarkus' version '1.5.0.Final'
    id 'com.google.protobuf' version '0.8.12'
    }
  2. Run any gradle command

Environment (please complete the following information):

  • Output of uname -a or ver:
    Linux workstation 5.4.43-1-MANJARO #1 SMP PREEMPT Wed May 27 20:25:12 UTC 2020 x86_64 GNU/Linux
  • Output of java -version:
    openjdk version "11.0.7" 2020-04-14
    OpenJDK Runtime Environment (build 11.0.7+10)
    OpenJDK 64-Bit Server VM (build 11.0.7+10, mixed mode)
  • GraalVM version (if different from Java):
    20.1.0
  • Quarkus version or git rev:
    1.5.0.Final
  • Build tool (ie. output of mvnw --version or gradlew --version):
    Gradle 6.4.1 and 6.5
aregradle kinquestion

All 12 comments

/cc @quarkusio/devtools

I was able to get them to work together with

build.gradle.kts

project.configurations {
  create("native-testCompileProtoPath")
}

Thanks.
Can confirm that the workaround worked for me as well

/cc @glefloch didn't you make some adjustments around this area?

I remember reading an issue about that but I can't find it. I think @aloubyansky fixed it.
If that's not the case, I will have a look.

No, I did not look into this.

Ahh found it: https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/Gradle.20help.20requested
It seems the problem was comming from the protobufplugin.
@Ladicek pushed a commit but I'm not sure they released a new version of the plugin.

Is this still a problem or has it been fixed?

I don't think they released the fix provided by @Ladicek, so I would say this is still a problem..

Just for the record, because I noticed that it is not linked from here, the fix is this: https://github.com/google/protobuf-gradle-plugin/pull/399

@dliraf the protobuf plugin seems to have release a new version 0.8.13 which should embed the fix.
Can you try with this new version of the plugin?

Can confirm that they fixed the issue in com.google.protobuf:0.8.13

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rashmini picture Rashmini  路  3Comments

halhelal picture halhelal  路  3Comments

emmanuelbernard picture emmanuelbernard  路  3Comments

rodrigofujioka picture rodrigofujioka  路  3Comments

blsouthr picture blsouthr  路  3Comments