Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
distribution: 'zulu'
java-version-file: .github/workflows/.java-version
- uses: gradle/actions/setup-gradle@v5
- run: ./gradlew publish dokkaGenerate
- run: ./gradlew publish dokkaGenerate -PmavenCentralDeploymentValidation=PUBLISHED
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
Expand Down
6 changes: 0 additions & 6 deletions moshi-adapters/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import com.vanniktech.maven.publish.JavadocJar.None
import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.configure

plugins {
kotlin("jvm")
Expand All @@ -21,5 +17,3 @@ dependencies {
tasks.withType<Jar>().configureEach {
manifest { attributes("Automatic-Module-Name" to "com.squareup.moshi.adapters") }
}

configure<MavenPublishBaseExtension> { configure(KotlinJvm(javadocJar = None())) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this prevent it from publishing? Or do we get some default behaviour? In Okio we do this:

configure<MavenPublishBaseExtension> {
  configure(
    KotlinMultiplatform(javadocJar = JavadocJar.Empty())
  )
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Applying the plugin alone is enough I think since we have this auto-configuring from the root project on subprojects. This line seemed to just disable javadoc jars, which is what was breaking sonatype's validation per @gabrielittner

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Worst case it still fails validation and we try something else 😅

Copy link
Contributor

Choose a reason for hiding this comment

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

When you apply the base plugin you need to call one of the configure methods from the DSL. There are cases where we just configure publications created by others then it might still work, in other cases nothing will get published at all

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmmm I missed the "base" bit. I'm not sure why we have that tbh, stuck a PR up here to remove that and use the standard setup: #2077

5 changes: 0 additions & 5 deletions moshi-kotlin-codegen/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import com.vanniktech.maven.publish.JavadocJar.None
import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand Down Expand Up @@ -53,5 +50,3 @@ dependencies {
testImplementation(libs.truth)
testImplementation(libs.kotlinCompileTesting)
}

configure<MavenPublishBaseExtension> { configure(KotlinJvm(javadocJar = None())) }
6 changes: 0 additions & 6 deletions moshi-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import com.vanniktech.maven.publish.JavadocJar.None
import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.configure

plugins {
kotlin("jvm")
Expand All @@ -22,5 +18,3 @@ dependencies {
tasks.withType<Jar>().configureEach {
manifest { attributes("Automatic-Module-Name" to "com.squareup.moshi.kotlin") }
}

configure<MavenPublishBaseExtension> { configure(KotlinJvm(javadocJar = None())) }
6 changes: 0 additions & 6 deletions moshi/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import com.vanniktech.maven.publish.JavadocJar.None
import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.configure
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation.Companion.MAIN_COMPILATION_NAME
Expand Down Expand Up @@ -65,5 +61,3 @@ dependencies {
tasks.withType<Jar>().configureEach {
manifest { attributes("Automatic-Module-Name" to "com.squareup.moshi") }
}

configure<MavenPublishBaseExtension> { configure(KotlinJvm(javadocJar = None())) }
Loading