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

Update dependencies and fix javadoc artifacts #127

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a new experimental rule. In some cases it does the right thing but without the fix above it leads to compile errors. It also is rewriting a large number of files - I might just leave this disabled and manually update the simpler methods to follow the recommended style.

),
pkwarren marked this conversation as resolved.
Show resolved Hide resolved
)
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)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was causing docs not to be included.

}
}
if (name == "dokkaGfm") {
outputDirectory.set(project.file("${project.rootDir}/docs/3.x"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure where this is coming from - we don't publish GFM anywhere so I've switched to the standard dokkaHtml format.

}
}
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" }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This requires a new Android SDK.

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,
Comment on lines +45 to +46
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO it was clearer before, but if this violates a lint rule it's not a big deal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah this failed a new lint rule that required comments to be on their own lines.

generateBlockingUnaryMethods = parameters[BLOCKING_UNARY_SIGNATURE]?.toBoolean() ?: false,
)
}
Loading