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

Add failing test #2949

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add failing test #2949

wants to merge 2 commits into from

Conversation

staktrace
Copy link
Collaborator

@staktrace staktrace commented May 18, 2024

This test demonstrates #2950, that running gradle kotlinSourcesJar on a trivial wire project generates a sources jar with 3 copies of each wire-generated file.

}

ZipFile(File(fixtureRoot, "build/libs/kotlinsourcesjar-sources.jar")).use {
assertThat(it.stream().filter { it.name.contains("Period.kt") }.count()).isEqualTo(1)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The count here comes to be 3 instead of 1

@oldergod oldergod self-requested a review June 28, 2024 09:16
@oldergod oldergod marked this pull request as ready for review June 28, 2024 09:16
Comment on lines -193 to -203
// TODO: pair up generatedSourceDirectories with their targets so we can be precise.
for (generatedSourcesDirectory in generatedSourcesDirectories) {
val relativePath = generatedSourcesDirectory.toRelativeString(project.projectDir)
if (hasJavaOutput) {
source.javaSourceDirectorySet?.srcDir(relativePath)
}
if (hasKotlinOutput) {
source.kotlinSourceDirectorySet?.srcDir(relativePath)
}
}

Copy link
Member

Choose a reason for hiding this comment

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

We're kinda doing it below which one of the duplicacy was coming from

Comment on lines 84 to +85
kotlinSourceDirectorySet = sourceDirectorySet,
javaSourceDirectorySet = sourceDirectorySet,
javaSourceDirectorySet = null,
Copy link
Member

Choose a reason for hiding this comment

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

Other duplicacy

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.

None yet

2 participants