Skip to content

Commit

Permalink
Update dependencies and fix javadoc artifacts
Browse files Browse the repository at this point in the history
Update to the latest versions of spotless, android libraries, and
the Maven plugin. Fix javadoc generation for Maven artifacts (previously
empty).
  • Loading branch information
pkwarren committed Oct 9, 2023
1 parent b901c3a commit b4a7d56
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 27 deletions.
24 changes: 14 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,23 @@ allprojects {
spotless {
isEnforceCheck = false // Disables lint on gradle builds.
kotlin {
ktlint().editorConfigOverride(mapOf("ktlint_experimental" to "enabled"))
ktlint().editorConfigOverride(
mapOf(
"ktlint_experimental" to "enabled",
// Disabled until https://github.com/pinterest/ktlint/pull/2273 is released
"ktlint_standard_function-expression-body" to "disabled",
),
)
target("**/*.kt")
}
kotlinGradle {
ktlint().editorConfigOverride(mapOf("ktlint_experimental" to "enabled"))
ktlint().editorConfigOverride(
mapOf(
"ktlint_experimental" to "enabled",
// Disabled until https://github.com/pinterest/ktlint/pull/2273 is released
"ktlint_standard_function-expression-body" to "disabled",
),
)
target("**/*.kts")
}
}
Expand All @@ -76,16 +88,8 @@ allprojects {
}
tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets.configureEach {
reportUndocumented.set(false)
skipDeprecated.set(true)
jdkVersion.set(8)
perPackageOption {
matchingRegex.set("build\\.buf.*")
suppress.set(true)
}
}
if (name == "dokkaGfm") {
outputDirectory.set(project.file("${project.rootDir}/docs/3.x"))
}
}
plugins.withId("com.vanniktech.maven.publish.base") {
Expand Down
4 changes: 2 additions & 2 deletions examples/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ plugins {
}

android {
compileSdk = 33
compileSdk = 34

defaultConfig {
applicationId = "com.connectrpc.examples.android"
minSdk = 28
targetSdk = 33
targetSdk = 34
versionCode = 1
versionName = "1.0"
multiDexEnabled = true
Expand Down
4 changes: 2 additions & 2 deletions extensions/google-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ dependencies {
implementation(libs.kotlin.reflect)
}

configure<MavenPublishBaseExtension> {
mavenPublishing {
configure(
KotlinJvm(javadocJar = Dokka("dokkaGfm")),
KotlinJvm(javadocJar = Dokka("dokkaHtml")),
)
}

Expand Down
4 changes: 2 additions & 2 deletions extensions/google-javalite/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ sourceSets {
}
}

configure<MavenPublishBaseExtension> {
mavenPublishing {
configure(
KotlinJvm(javadocJar = Dokka("dokkaGfm")),
KotlinJvm(javadocJar = Dokka("dokkaHtml")),
)
}

Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ dokka = "1.9.0"
junit = "4.13.2"
kotlin = "1.9.10"
kotlinpoet = "1.14.2"
mavenplugin = "0.24.0"
mavenplugin = "0.25.3"
moshi = "1.15.0"
okhttp = "4.11.0"
okio = "3.6.0"
protobuf = "3.24.4"
slf4j = "2.0.9"
spotless = "6.21.0"
spotless = "6.22.0"

[libraries]
android = { module = "com.google.android:android", version.ref = "android" }
android-material = { module = "com.google.android.material:material", version = "1.9.0" }
android-material = { module = "com.google.android.material:material", version = "1.10.0" }
android-multidex = { module = "com.android.support:multidex", version = "1.0.3" }
android-plugin = { module = "com.android.tools.build:gradle", version = "8.1.2" }
androidx-annotations = { module = "androidx.annotation:annotation", version = "1.7.0" }
Expand Down
6 changes: 3 additions & 3 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import com.vanniktech.maven.publish.JavadocJar.Dokka
import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.MavenPublishBaseExtension

plugins {
kotlin("jvm")
Expand All @@ -23,11 +22,12 @@ dependencies {
ksp(libs.moshiKotlinCodegen)
}

configure<MavenPublishBaseExtension> {
mavenPublishing {
configure(
KotlinJvm(javadocJar = Dokka("dokkaGfm")),
KotlinJvm(javadocJar = Dokka("dokkaHtml")),
)
}

// Workaround for overriding the published library name to "connect-kotlin".
// Otherwise, the plugin will take the library name.
extensions.getByType<PublishingExtension>().apply {
Expand Down
4 changes: 2 additions & 2 deletions okhttp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ dependencies {
api(project(":library"))
}

configure<MavenPublishBaseExtension> {
mavenPublishing {
configure(
KotlinJvm(javadocJar = Dokka("dokkaGfm")),
KotlinJvm(javadocJar = Dokka("dokkaHtml")),
)
}

Expand Down
4 changes: 2 additions & 2 deletions protoc-gen-connect-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ sourceSets {
}
}

configure<MavenPublishBaseExtension> {
mavenPublishing {
configure(
KotlinJvm(javadocJar = Dokka("dokkaGfm")),
KotlinJvm(javadocJar = Dokka("dokkaHtml")),
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ internal fun parse(input: String): Configuration {
val parameters = parseGeneratorParameter(input)
return Configuration(
generateCallbackMethods = parameters[CALLBACK_SIGNATURE]?.toBoolean() ?: false,
generateCoroutineMethods = parameters[COROUTINE_SIGNATURE]?.toBoolean() ?: true, // Defaulted to true.
// Defaulted to true.
generateCoroutineMethods = parameters[COROUTINE_SIGNATURE]?.toBoolean() ?: true,
generateBlockingUnaryMethods = parameters[BLOCKING_UNARY_SIGNATURE]?.toBoolean() ?: false,
)
}

0 comments on commit b4a7d56

Please sign in to comment.