Skip to content

Commit

Permalink
Formatting and deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Nov 16, 2023
1 parent 71d081a commit c83f22f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
import com.diffplug.spotless.LineEnding
import io.gitlab.arturbosch.detekt.Detekt
import java.net.URL
import java.net.URI
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
Expand Down Expand Up @@ -55,7 +55,7 @@ tasks.named<DokkaTask>("dokkaHtml") {
outputDirectory.set(rootDir.resolve("docs/0.x"))
dokkaSourceSets.configureEach {
skipDeprecated.set(true)
externalDocumentationLink { url.set(URL("https://square.github.io/moshi/1.x/moshi/")) }
externalDocumentationLink { url.set(URI("https://square.github.io/moshi/1.x/moshi/").toURL()) }
}
}

Expand All @@ -66,7 +66,7 @@ spotless {
trimTrailingWhitespace()
endWithNewline()
}
val ktfmtVersion = "0.43"
val ktfmtVersion = "0.46"
kotlin {
target("**/*.kt")
ktfmt(ktfmtVersion).googleStyle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,7 @@ public class AutoValueKotlinExtension(
// Best-effort. We could be more precise with this, but it's noisy and annoying
initializer("%L", it)
}
}
?: run { initializer("TODO()") }
} ?: run { initializer("TODO()") }

field.parseDocs(elements)?.let { addKdoc(it) }
}
Expand Down
3 changes: 1 addition & 2 deletions src/main/kotlin/com/slack/auto/value/kotlin/utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ public fun FunSpec.Builder.withDocsFrom(
public fun ProcessingEnvironment.isParcelable(element: TypeElement): Boolean {
return elementUtils.getTypeElement("android.os.Parcelable")?.asType()?.let { parcelableClass ->
element.interfaces.any { it.isClassOfType(typeUtils, parcelableClass) }
}
?: false
} ?: false
}

private fun TypeMirror.isClassOfType(types: Types, other: TypeMirror?) =
Expand Down

0 comments on commit c83f22f

Please sign in to comment.