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

testFixtures publication is broken #136

Open
mauhiz opened this issue Nov 7, 2022 · 4 comments
Open

testFixtures publication is broken #136

mauhiz opened this issue Nov 7, 2022 · 4 comments

Comments

@mauhiz
Copy link
Contributor

mauhiz commented Nov 7, 2022

And maybe more since gradle module metadata is not published.
This worked up to this change https://github.com/line/gradle-scripts/pull/70/files#diff-ffb34903ae12e60a09d22b96a91acec88a6e037db610be204900722d6903767eR105-R108

Well, can't we just enable publishing module metadata?
Or, make it configurable?

@minwoox
Copy link
Member

minwoox commented Nov 7, 2022

I don't remember correctly, it seems like we disabled it because it doesn't work properly with the shading Jars.
We replace the Jar files with the shading ones which emits the error:
Cannot publish module metadata where component artifacts are modified.
https://github.com/line/armeria/blob/1be52b2a6fe9fe08d282206c506a489aea13db87/gradle/scripts/lib/java-publish.gradle#L18-L36
Having said this, if we are not using shade and relocate flags we can just enable it in the module's Gradle build file.

tasks.withType(GenerateModuleMetadata) {
    enabled = true
}

Are you using the flags?
Anyway, we definitely need to fix this.

@mauhiz
Copy link
Contributor Author

mauhiz commented Nov 8, 2022

No, I am not using these flags.
Until the fix, is there a workaround? Would pasting the above snippet in my build.gradle be enough? (not sure who wins..

@minwoox
Copy link
Member

minwoox commented Nov 8, 2022

Would pasting the above snippet in my build.gradle be enough?

At least, it worked for me. Could you try that and see if the metadata is correctly created?
FYI, we can create the metadata via ./gradlew generateMetadataFileForJarPublication

@mauhiz
Copy link
Contributor Author

mauhiz commented Mar 25, 2023

Oh, I forgot to follow up here. Yes, the workaround works

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

No branches or pull requests

2 participants