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

minor tidy up of buildSrc convention plugins #3162

Merged
merged 7 commits into from Aug 16, 2022
Merged

Conversation

aSemy
Copy link
Contributor

@aSemy aSemy commented Aug 15, 2022

Some minor config updates

  • use Kotlin DSL accessors, like tasks.javadoc
  • use Gradle config avoidance API (replace forEach {} with configureEach {}
  • merge related code blocks (publications.withType<MavenPublication>().configureEach {} was in there twice)

Merge same config blocks. Use Kotlin DSL accessors and Gradle config avoidance API
@Kantis
Copy link
Member

Kantis commented Aug 15, 2022

I actually think we could remove the javadoc stuff.. It's not used, right @sksamuel ?

@aSemy
Copy link
Contributor Author

aSemy commented Aug 15, 2022

Javadoc is required for Maven Central publishing, that might be why?

@Kantis
Copy link
Member

Kantis commented Aug 15, 2022

Ah, okay.. I had a discussion with Jetbrains about some issues with included builds that they hinted might be caused by the usage of java-library/javadoc plugins. I haven't gotten around to trying out removing them, but this could be another problem we run into then. 😄

@aSemy
Copy link
Contributor Author

aSemy commented Aug 15, 2022

Ahh yeah, so it would be best to remove the java-library plugin and instead create an empty Javadoc jar.

https://github.com/adamko-dev/kotlinx-serialization-typescript-generator/blob/2914dd6256600671f37583c5371759cc8ec27393/buildSrc/src/main/kotlin/buildsrc/convention/maven-publish.gradle.kts#L127-L149

While you could add Dokka HTML/Javadoc in the Javadoc jar, I don't really see the point. It really slows down the build, and how many people are going to unzip it and look at the contents, vs looking at the Kotest website? Especially since the source-jar is included, so that includes the documentation.

@aSemy
Copy link
Contributor Author

aSemy commented Aug 16, 2022

I removed the java-library plugin, updated the JavadocJar task with an explanation, and moved the signing config after the publishing config (to try and avoid this issue gradle/gradle#16961)

@sksamuel
Copy link
Member

I actually think we could remove the javadoc stuff.. It's not used, right @sksamuel ?

We need to generate the jar at least for publication.

@sksamuel
Copy link
Member

As long as we create an empty one it'll work - as maven central insists on one.

@sksamuel sksamuel merged commit 8d15c68 into kotest:master Aug 16, 2022
@aSemy aSemy deleted the patch-3 branch August 18, 2022 05:35
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

3 participants