Skip to content

Align default output folder with Gradle best practices#755

Merged
ejona86 merged 6 commits intogoogle:masterfrom
holgerstolzenberg:feature/default-output-folder
Nov 13, 2024
Merged

Align default output folder with Gradle best practices#755
ejona86 merged 6 commits intogoogle:masterfrom
holgerstolzenberg:feature/default-output-folder

Conversation

@holgerstolzenberg
Copy link
Copy Markdown
Contributor

Fixes #754

@holgerstolzenberg
Copy link
Copy Markdown
Contributor Author

What do I have to do to get that one reviewed?

@ejona86
Copy link
Copy Markdown
Collaborator

ejona86 commented Nov 12, 2024

Some GitHub Actions are failing. The error "exec: /nothing: not found" is suspicious and they haven't run in 6 months, so I suspect they are broken on master, best guess due to an Ubuntu upgrade. That'll need some investigation.

@ejona86
Copy link
Copy Markdown
Collaborator

ejona86 commented Nov 12, 2024

Looks like the CI is still failing, and the CI is working fine on master, so the problem is this PR.

It looks like the /nothing is a red herring. It was just part of stderr but was expected. Looking higher in the log shows the error:

com.google.protobuf.gradle.ProtobufJavaPluginTest > test proto extraction is up-to-date for testProject when changing java sources [gradle 7.6] STANDARD_ERROR

    FAILURE: 
    Build failed with an exception.


    * Where:

    Script '/home/runner/work/protobuf-gradle-plugin/protobuf-gradle-plugin/build/tests/testProject/build_base.gradle' line: 132


    * What went wrong:

    Execution failed for task ':test'.

    > 
    assert expectedDirs == actualDirs

             |            |  |

             |            |  []

             |            false

             [/home/runner/work/protobuf-gradle-plugin/protobuf-gradle-plugin/build/tests/testProject/build/generated/source/proto/main/java]

I think you need to update the test projects, like:

val baseDir = File("${project.buildDir}/generated/source/proto/$sourceSet")

@holgerstolzenberg
Copy link
Copy Markdown
Contributor Author

You are totally right - the tests completely slipped my radar 🙈.

Actually searching the codebase reveals much more spots if output path assertions. I fixed them all. The problem is I cannot fully run the tests locally, I have no Android setup and other stuff is also missing. I tested the plugin manually after building it locally and it worked.

I had hopes I could just run it through the CI here - but it looks like GitHub is not kicking the build again....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use plural form default output directory 'generated/sources'

2 participants