From 380b3df67af1034c7c3fddc41fea33d83a12a1b7 Mon Sep 17 00:00:00 2001 From: Ben Liblit Date: Sat, 9 Dec 2023 14:43:33 -0500 Subject: [PATCH] Use structured KDoc comments Also conform to KDoc conventions: initial capital letter and trailing period for the first sentence. --- .../com/ibm/wala/gradle/CompileKawaScheme.kt | 6 +----- .../com/ibm/wala/gradle/CreatePackageList.kt | 8 ++------ .../com/ibm/wala/gradle/VerifiedDownload.kt | 20 ++++++++----------- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/build-logic/src/main/kotlin/com/ibm/wala/gradle/CompileKawaScheme.kt b/build-logic/src/main/kotlin/com/ibm/wala/gradle/CompileKawaScheme.kt index 275d181707..18c5ae5aa1 100644 --- a/build-logic/src/main/kotlin/com/ibm/wala/gradle/CompileKawaScheme.kt +++ b/build-logic/src/main/kotlin/com/ibm/wala/gradle/CompileKawaScheme.kt @@ -13,11 +13,7 @@ import org.gradle.api.tasks.OutputDirectory import org.gradle.api.tasks.PathSensitive import org.gradle.api.tasks.PathSensitivity -//////////////////////////////////////////////////////////////////////// -// -// specialized task for Kawa compilation into jar archive -// - +/** Specialized task for Kawa compilation into jar archive. */ @CacheableTask abstract class CompileKawaScheme @Inject constructor(project: Project) : JavaExec() { diff --git a/build-logic/src/main/kotlin/com/ibm/wala/gradle/CreatePackageList.kt b/build-logic/src/main/kotlin/com/ibm/wala/gradle/CreatePackageList.kt index 7ad4c8d071..eaf336e3fb 100644 --- a/build-logic/src/main/kotlin/com/ibm/wala/gradle/CreatePackageList.kt +++ b/build-logic/src/main/kotlin/com/ibm/wala/gradle/CreatePackageList.kt @@ -11,11 +11,7 @@ import org.gradle.api.tasks.OutputDirectory import org.gradle.api.tasks.SourceSet import org.gradle.api.tasks.TaskAction -//////////////////////////////////////////////////////////////////////// -// -// create a Javadoc-style "package-list" file -// - +/** Create a Javadoc-style `package-list` file. */ @CacheableTask open class CreatePackageList : DefaultTask() { @@ -25,7 +21,7 @@ open class CreatePackageList : DefaultTask() { private var sourceFileSubdirectories: SortedSet? = null - // serializable representation of subdirs suitable for cache indexing + /** Serializable representation of subdirs suitable for cache indexing. */ @Input fun getSourceFileSubdirectories() = sourceFileSubdirectories!!.map { it.toString() } fun sourceSet(sourceSet: SourceSet) { diff --git a/build-logic/src/main/kotlin/com/ibm/wala/gradle/VerifiedDownload.kt b/build-logic/src/main/kotlin/com/ibm/wala/gradle/VerifiedDownload.kt index af1efb2919..db1fd58109 100644 --- a/build-logic/src/main/kotlin/com/ibm/wala/gradle/VerifiedDownload.kt +++ b/build-logic/src/main/kotlin/com/ibm/wala/gradle/VerifiedDownload.kt @@ -13,36 +13,32 @@ import org.gradle.api.tasks.OutputFile import org.gradle.api.tasks.TaskAction import org.gradle.kotlin.dsl.property -//////////////////////////////////////////////////////////////////////// -// -// download and use checksum to verify that we got what we expected -// - +/** Download and use checksum to verify that we got what we expected. */ @CacheableTask abstract class VerifiedDownload : DefaultTask() { - // URI of resource to download + /** URI of resource to download. */ @get:Input abstract val src: Property - // expected checksum of resource as hex digits + /** Expected checksum of resource as hex digits. */ @get:Input abstract val checksum: Property - // algorithm to use for computing checksum + /** Algorithm to use for computing checksum. */ @get:Input val algorithm: Property = project.objects.property().convention("MD5") - // whether to use ETag for selective downloading + /** Whether to use ETag for selective downloading. */ @get:Input val useETag: Property = project.objects.property().convention(true) - // local file into which resource should be saved + /** Local file into which resource should be saved. */ @get:OutputFile abstract val dest: RegularFileProperty - // plugin-provided extension for downloading a resource from some URL + /** Plugin-provided extension for downloading a resource from some URL. */ @Internal @Suppress("LeakingThis") val downloadExtension: DownloadExtension = project.objects.newInstance(DownloadExtension::class.java, this) - // plugin-provided extension for verifying that a file has the expected checksum + /** Plugin-provided extension for verifying that a file has the expected checksum. */ @Internal @Suppress("LeakingThis") val verifyExtension: VerifyExtension =