Skip to content

Commit

Permalink
Use structured KDoc comments
Browse files Browse the repository at this point in the history
Also conform to KDoc conventions: initial capital letter and trailing
period for the first sentence.
  • Loading branch information
liblit committed Dec 9, 2023
1 parent 1144a18 commit 4172f16
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand All @@ -25,7 +21,7 @@ open class CreatePackageList : DefaultTask() {

private var sourceFileSubdirectories: SortedSet<Path>? = 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<URI>

// expected checksum of resource as hex digits
/** Expected checksum of resource as hex digits. */
@get:Input abstract val checksum: Property<String>

// algorithm to use for computing checksum
/** Algorithm to use for computing checksum. */
@get:Input val algorithm: Property<String> = project.objects.property<String>().convention("MD5")

// whether to use ETag for selective downloading
/** Whether to use ETag for selective downloading. */
@get:Input val useETag: Property<Boolean> = project.objects.property<Boolean>().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 =
Expand Down

0 comments on commit 4172f16

Please sign in to comment.