Skip to content

Commit

Permalink
Update Gradle publish plugin to 1.0.0-rc-3 version
Browse files Browse the repository at this point in the history
This should fix publishing multiple artifacts with the same hash and
remove requirement of custom action from Gradle team.
  • Loading branch information
Tapchicoma authored and Space committed Jun 28, 2022
1 parent 5c34d5b commit 7cc0002
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ dependencies {
implementation(kotlin("stdlib", embeddedKotlinVersion))
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${project.bootstrapKotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-build-gradle-plugin:${kotlinBuildProperties.buildGradlePluginVersion}")
implementation("com.gradle.publish:plugin-publish-plugin:0.20.0")
implementation("com.gradle.publish:plugin-publish-plugin:1.0.0-rc-3")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.6.10")

implementation("net.rubygrapefruit:native-platform:${property("versions.native-platform")}")
Expand Down
28 changes: 16 additions & 12 deletions buildSrc/src/main/kotlin/GradleCommon.kt
Original file line number Diff line number Diff line change
Expand Up @@ -289,22 +289,26 @@ fun Project.reconfigureMainSourcesSetForGradlePlugin(
}
}

plugins.withId("org.jetbrains.dokka") {
val dokkaTask = tasks.named<DokkaTask>("dokkaJavadoc") {
dokkaSourceSets {
named(commonSourceSet.name) {
suppress.set(false)
}
if (kotlinBuildProperties.publishGradlePluginsJavadoc ||
kotlinBuildProperties.isTeamcityBuild
) {
plugins.withId("org.jetbrains.dokka") {
val dokkaTask = tasks.named<DokkaTask>("dokkaJavadoc") {
dokkaSourceSets {
named(commonSourceSet.name) {
suppress.set(false)
}

named("main") {
dependsOn(commonSourceSet)
named("main") {
dependsOn(commonSourceSet)
}
}
}
}

tasks.withType<Jar>().configureEach {
if (name == javadocJarTaskName) {
from(dokkaTask.flatMap { it.outputDirectory })
tasks.withType<Jar>().configureEach {
if (name == javadocJarTaskName) {
from(dokkaTask.flatMap { it.outputDirectory })
}
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2120,10 +2120,10 @@
<sha256 value="f1dc5b9c242d0d90401c6287458db184978b855e12ce0c412fecad361dca0213" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.gradle.publish" name="plugin-publish-plugin" version="0.20.0">
<artifact name="plugin-publish-plugin-0.20.0.jar">
<md5 value="7332672ea82e8ba857b8474837deae6e" origin="Generated by Gradle"/>
<sha256 value="e71dc838ada62842fb9d1ea3f64a5615d09a032adb7f7e6a9e52235e9a80e77d" origin="Generated by Gradle"/>
<component group="com.gradle.publish" name="plugin-publish-plugin" version="1.0.0-rc-3">
<artifact name="plugin-publish-plugin-1.0.0-rc-3.jar">
<md5 value="e8f8cf5cc8cab2b7df87b227772a9089" origin="Generated by Gradle"/>
<sha256 value="3441a5772dcb9461146aa59caf2eb5a665826ed393340d10b16f1346d11340c0" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.ibm.icu" name="icu4j" version="53.1">
Expand Down

0 comments on commit 7cc0002

Please sign in to comment.