diff --git a/build.gradle.kts b/build.gradle.kts index 4a8a4b5..7436bdc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ + import com.jfrog.bintray.gradle.tasks.BintrayUploadTask -import org.jetbrains.dokka.gradle.LinkMapping import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import java.io.FileInputStream import java.util.Properties @@ -141,14 +141,14 @@ tasks { outputFormat = "html" outputDirectory = "$buildDir/javadoc" jdkVersion = 8 - val mapping = LinkMapping().apply { + + linkMapping { dir = "src/main/kotlin" - url = "https://github.com/ethauvin/${project.name}/blob/${project.version}/src/main/kotlin" + url = "https://github.com/ethauvin/akismet-kotlin/blob/master/src/main/kotlin" suffix = "#L" } includes = listOf("config/dokka/packages.md") - linkMappings = arrayListOf(mapping) includeNonPublic = false } diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 07ebb43..080087d 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -23,6 +23,5 @@ tasks { group = "application" main = "com.example.AkismetSample" classpath = sourceSets["main"].runtimeClasspath - } } diff --git a/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt b/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt index fa965d1..c694f55 100644 --- a/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt +++ b/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt @@ -182,13 +182,12 @@ open class Akismet(apiKey: String) { * Submit Ham. * See the [Akismet API](https://akismet.com/development/api/#submit-ham) for more details. */ - fun submitHam(comment: AkismetComment): Boolean { return executeMethod(buildApiUrl("submit-ham"), buildFormBody(comment)) } /** - * Convert a [Date][java.util.Date] to a UTC timestamp for use with [dateGmt][AkismetComment.dateGmt], etc. + * Convert a date to a UTC timestamp. */ fun dateToGmt(date: Date): String { return DateTimeFormatter.ISO_DATE_TIME.format( @@ -196,8 +195,7 @@ open class Akismet(apiKey: String) { } /** - * Convert a [LocalDateTime][java.time.LocalDateTime] to a UTC timestamp for use with - * [dateGmt][AkismetComment.dateGmt], etc. + * Convert a locale date/time to a UTC timestamp. */ fun dateToGmt(date: LocalDateTime): String { return DateTimeFormatter.ISO_DATE_TIME.format( @@ -291,7 +289,7 @@ open class Akismet(apiKey: String) { add("user_role", comment.userRole) } if (comment.isTest) { - add("is_test", "true") + add("is_test", "1") } if (comment.recheckReason.isNotBlank()) { add("recheck_reason", comment.recheckReason) diff --git a/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt b/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt index e027a3d..87625e9 100644 --- a/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt +++ b/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt @@ -128,7 +128,7 @@ open class AkismetComment() { * Akismet. * * How the submitted content interacts with the server can be very telling, so please include as much of it as - * ossible. + * possible. */ var other: Map = emptyMap()