diff --git a/build.gradle.kts b/build.gradle.kts index e7898cf..59ea842 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,6 @@ import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.gradle.api.tasks.testing.logging.TestExceptionFormat import java.io.FileInputStream import java.util.* @@ -9,6 +10,7 @@ plugins { id("org.jetbrains.dokka") version "1.4.32" id("org.jetbrains.kotlin.jvm") version "1.5.0" id("org.sonarqube") version "3.2.0" + java `java-library` `maven-publish` jacoco @@ -31,6 +33,8 @@ repositories { } dependencies { + implementation(platform("org.jetbrains.kotlin:kotlin-bom")) + implementation("org.jsoup:jsoup:1.13.1") testImplementation("org.jetbrains.kotlin:kotlin-test") @@ -66,12 +70,18 @@ tasks { kotlinOptions.jvmTarget = "1.8" } + withType { + testLogging { + exceptionFormat = TestExceptionFormat.FULL + } + } + withType { destination = file("$projectDir/pom.xml") } jacoco { - toolVersion = "0.8.7-SNAPSHOT" + toolVersion = "0.8.7" } jacocoTestReport { @@ -170,7 +180,7 @@ publishing { scm { connection.set("scm:git:git://github.com/$gitHub.git") developerConnection.set("scm:git:git@github.com:$gitHub.git") - url.set("$mavenUrl") + url.set(mavenUrl) } issueManagement { system.set("GitHub") diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 7837ffd..fa9a099 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -4,8 +4,8 @@ plugins { application } -// ./gradlew run --args="example.html" -// ./gradlew runJava --args="example.html" +// ./gradlew run +// ./gradlew runJava repositories { mavenLocal() @@ -17,7 +17,7 @@ dependencies { } application { - mainClassName = "com.example.ReadingTimeExampleKt" + mainClass.set("com.example.ReadingTimeExampleKt") } tasks { @@ -28,7 +28,7 @@ tasks { register("runJava") { group = "application" main = "com.example.ReadingTimeSample" - classpath = sourceSets["main"].runtimeClasspath + classpath = sourceSets.main.get().runtimeClasspath args = listOf("${project.projectDir}/example.html") } } diff --git a/examples/gradle/wrapper/gradle-wrapper.properties b/examples/gradle/wrapper/gradle-wrapper.properties index f371643..e5338d3 100644 --- a/examples/gradle/wrapper/gradle-wrapper.properties +++ b/examples/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f371643..e5338d3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists