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

Specifying the Generated dir for javapgv #829

Closed
duboisford opened this issue Mar 31, 2023 · 2 comments
Closed

Specifying the Generated dir for javapgv #829

duboisford opened this issue Mar 31, 2023 · 2 comments
Labels
Java Java/JVM language support Question Question about the library

Comments

@duboisford
Copy link

By default, when I execute the ./gradlew clean generateProto task, the generated java files for javapgv are placed in ${project.root}/build/generated/source/proto/main/javapgc and this works fine.

I would instead like to have them generated in ${project.root}/src/main/java. I added the following to my build.grade

protobuf {
...
setGeneratedFilesBaseDirProperty("${project.rootDir}/src")
...
}

However, now when the jar task is executed the files are generated in ${project.root}/src/main/javapgv

I would like to generate them in ${project.rootDir}/src/main/java. I would like to not use the javapgc directory in the project. Is this possible?

@rodaine rodaine added Question Question about the library Java Java/JVM language support labels Apr 20, 2023
@pierretasci
Copy link

generateProtoTasks {
        all()*.plugins {
            javapgv {
                option "lang=java"
                outputSubDir = "java"
            }
        }
    }

That should do the trick

@chrispine
Copy link
Contributor

As explained in the README, this project is in maintenance mode. We recommend upgrading to protovalidate.

I'm going to go ahead and close this issue, but feel free to open one against protovalidate if needed. Thanks!

@chrispine chrispine closed this as not planned Won't fix, can't repro, duplicate, stale Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Java/JVM language support Question Question about the library
Projects
None yet
Development

No branches or pull requests

4 participants