Skip to content

Commit b4a7d56

Browse files
committed
Update dependencies and fix javadoc artifacts
Update to the latest versions of spotless, android libraries, and the Maven plugin. Fix javadoc generation for Maven artifacts (previously empty).
1 parent b901c3a commit b4a7d56

File tree

9 files changed

+32
-27
lines changed

9 files changed

+32
-27
lines changed

build.gradle.kts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,23 @@ allprojects {
5151
spotless {
5252
isEnforceCheck = false // Disables lint on gradle builds.
5353
kotlin {
54-
ktlint().editorConfigOverride(mapOf("ktlint_experimental" to "enabled"))
54+
ktlint().editorConfigOverride(
55+
mapOf(
56+
"ktlint_experimental" to "enabled",
57+
// Disabled until https://github.com/pinterest/ktlint/pull/2273 is released
58+
"ktlint_standard_function-expression-body" to "disabled",
59+
),
60+
)
5561
target("**/*.kt")
5662
}
5763
kotlinGradle {
58-
ktlint().editorConfigOverride(mapOf("ktlint_experimental" to "enabled"))
64+
ktlint().editorConfigOverride(
65+
mapOf(
66+
"ktlint_experimental" to "enabled",
67+
// Disabled until https://github.com/pinterest/ktlint/pull/2273 is released
68+
"ktlint_standard_function-expression-body" to "disabled",
69+
),
70+
)
5971
target("**/*.kts")
6072
}
6173
}
@@ -76,16 +88,8 @@ allprojects {
7688
}
7789
tasks.withType<DokkaTask>().configureEach {
7890
dokkaSourceSets.configureEach {
79-
reportUndocumented.set(false)
8091
skipDeprecated.set(true)
8192
jdkVersion.set(8)
82-
perPackageOption {
83-
matchingRegex.set("build\\.buf.*")
84-
suppress.set(true)
85-
}
86-
}
87-
if (name == "dokkaGfm") {
88-
outputDirectory.set(project.file("${project.rootDir}/docs/3.x"))
8993
}
9094
}
9195
plugins.withId("com.vanniktech.maven.publish.base") {

examples/android/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ plugins {
44
}
55

66
android {
7-
compileSdk = 33
7+
compileSdk = 34
88

99
defaultConfig {
1010
applicationId = "com.connectrpc.examples.android"
1111
minSdk = 28
12-
targetSdk = 33
12+
targetSdk = 34
1313
versionCode = 1
1414
versionName = "1.0"
1515
multiDexEnabled = true

extensions/google-java/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ dependencies {
2929
implementation(libs.kotlin.reflect)
3030
}
3131

32-
configure<MavenPublishBaseExtension> {
32+
mavenPublishing {
3333
configure(
34-
KotlinJvm(javadocJar = Dokka("dokkaGfm")),
34+
KotlinJvm(javadocJar = Dokka("dokkaHtml")),
3535
)
3636
}
3737

extensions/google-javalite/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ sourceSets {
2828
}
2929
}
3030

31-
configure<MavenPublishBaseExtension> {
31+
mavenPublishing {
3232
configure(
33-
KotlinJvm(javadocJar = Dokka("dokkaGfm")),
33+
KotlinJvm(javadocJar = Dokka("dokkaHtml")),
3434
)
3535
}
3636

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ dokka = "1.9.0"
66
junit = "4.13.2"
77
kotlin = "1.9.10"
88
kotlinpoet = "1.14.2"
9-
mavenplugin = "0.24.0"
9+
mavenplugin = "0.25.3"
1010
moshi = "1.15.0"
1111
okhttp = "4.11.0"
1212
okio = "3.6.0"
1313
protobuf = "3.24.4"
1414
slf4j = "2.0.9"
15-
spotless = "6.21.0"
15+
spotless = "6.22.0"
1616

1717
[libraries]
1818
android = { module = "com.google.android:android", version.ref = "android" }
19-
android-material = { module = "com.google.android.material:material", version = "1.9.0" }
19+
android-material = { module = "com.google.android.material:material", version = "1.10.0" }
2020
android-multidex = { module = "com.android.support:multidex", version = "1.0.3" }
2121
android-plugin = { module = "com.android.tools.build:gradle", version = "8.1.2" }
2222
androidx-annotations = { module = "androidx.annotation:annotation", version = "1.7.0" }

library/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import com.vanniktech.maven.publish.JavadocJar.Dokka
22
import com.vanniktech.maven.publish.KotlinJvm
3-
import com.vanniktech.maven.publish.MavenPublishBaseExtension
43

54
plugins {
65
kotlin("jvm")
@@ -23,11 +22,12 @@ dependencies {
2322
ksp(libs.moshiKotlinCodegen)
2423
}
2524

26-
configure<MavenPublishBaseExtension> {
25+
mavenPublishing {
2726
configure(
28-
KotlinJvm(javadocJar = Dokka("dokkaGfm")),
27+
KotlinJvm(javadocJar = Dokka("dokkaHtml")),
2928
)
3029
}
30+
3131
// Workaround for overriding the published library name to "connect-kotlin".
3232
// Otherwise, the plugin will take the library name.
3333
extensions.getByType<PublishingExtension>().apply {

okhttp/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ dependencies {
1515
api(project(":library"))
1616
}
1717

18-
configure<MavenPublishBaseExtension> {
18+
mavenPublishing {
1919
configure(
20-
KotlinJvm(javadocJar = Dokka("dokkaGfm")),
20+
KotlinJvm(javadocJar = Dokka("dokkaHtml")),
2121
)
2222
}
2323

protoc-gen-connect-kotlin/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ sourceSets {
4545
}
4646
}
4747

48-
configure<MavenPublishBaseExtension> {
48+
mavenPublishing {
4949
configure(
50-
KotlinJvm(javadocJar = Dokka("dokkaGfm")),
50+
KotlinJvm(javadocJar = Dokka("dokkaHtml")),
5151
)
5252
}
5353

protoc-gen-connect-kotlin/src/main/kotlin/com/connectrpc/protocgen/connect/internal/Parameters.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ internal fun parse(input: String): Configuration {
4242
val parameters = parseGeneratorParameter(input)
4343
return Configuration(
4444
generateCallbackMethods = parameters[CALLBACK_SIGNATURE]?.toBoolean() ?: false,
45-
generateCoroutineMethods = parameters[COROUTINE_SIGNATURE]?.toBoolean() ?: true, // Defaulted to true.
45+
// Defaulted to true.
46+
generateCoroutineMethods = parameters[COROUTINE_SIGNATURE]?.toBoolean() ?: true,
4647
generateBlockingUnaryMethods = parameters[BLOCKING_UNARY_SIGNATURE]?.toBoolean() ?: false,
4748
)
4849
}

0 commit comments

Comments
 (0)