Upgraded to Kotlin 1.9.21

This commit is contained in:
Erik C. Thauvin 2023-11-23 17:51:52 -08:00
parent 265c852f14
commit 32e68cd079
8 changed files with 30 additions and 34 deletions

2
.idea/misc.xml generated
View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="EntryPointsManager"> <component name="EntryPointsManager">
<pattern value="net.thauvin.erik.ReadingTimeBuild" method="jacoco" /> <pattern value="net.thauvin.erik.ReadingTimeBuild" method="jacoco" />
@ -12,6 +13,7 @@
<option value="$PROJECT_DIR$/../../java/bld-checkstyle/config/pmd.xml" /> <option value="$PROJECT_DIR$/../../java/bld-checkstyle/config/pmd.xml" />
<option value="$PROJECT_DIR$/../../java/bld-exec/config/pmd.xml" /> <option value="$PROJECT_DIR$/../../java/bld-exec/config/pmd.xml" />
<option value="$PROJECT_DIR$/../../java/bld-testng/config/pmd.xml" /> <option value="$PROJECT_DIR$/../../java/bld-testng/config/pmd.xml" />
<option value="$PROJECT_DIR$/../../java/bld-generated-version/config/pmd.xml" />
</list> </list>
</option> </option>
<option name="skipTestSources" value="false" /> <option name="skipTestSources" value="false" />

View file

@ -1,5 +1,5 @@
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause) [![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause)
[![Kotlin](https://img.shields.io/badge/kotlin-1.9.20-7f52ff)](https://kotlinlang.org/) [![Kotlin](https://img.shields.io/badge/kotlin-1.9.21-7f52ff)](https://kotlinlang.org/)
[![Release](https://img.shields.io/github/release/ethauvin/readingtime.svg)](https://github.com/ethauvin/readingtime/releases/latest) [![Release](https://img.shields.io/github/release/ethauvin/readingtime.svg)](https://github.com/ethauvin/readingtime/releases/latest)
[![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/readingtime.svg?label=maven%20central)](https://search.maven.org/search?q=g:%22net.thauvin.erik%22%20AND%20a:%22readingtime%22) [![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/readingtime.svg?label=maven%20central)](https://search.maven.org/search?q=g:%22net.thauvin.erik%22%20AND%20a:%22readingtime%22)
[![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/readingtime?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/readingtime/) [![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/readingtime?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/readingtime/)

View file

@ -1,7 +1,7 @@
## Kotlin Example ## Kotlin Example
To compile & run the Kotlin example: To compile & run the Kotlin example:
```text ```console
./bld compile run --args="example.html" ./bld compile run --args="example.html"
``` ```
@ -9,6 +9,6 @@ To compile & run the Kotlin example:
To compile & run the Java example: To compile & run the Java example:
```text ```console
./bld compile run-java --args="example.html" ./bld compile run-java --args="example.html"
``` ```

View file

@ -1,13 +1,13 @@
package com.example; package com.example;
import rife.bld.BaseProject;
import rife.bld.BuildCommand; import rife.bld.BuildCommand;
import rife.bld.extension.CompileKotlinOperation; import rife.bld.extension.CompileKotlinOperation;
import rife.bld.extension.CompileKotlinOptions;
import rife.bld.operations.RunOperation; import rife.bld.operations.RunOperation;
import rife.bld.BaseProject;
import java.util.List; import java.util.List;
import static rife.bld.dependencies.Repository.*; import static rife.bld.dependencies.Repository.*;
import static rife.bld.dependencies.Scope.compile; import static rife.bld.dependencies.Scope.compile;
@ -25,7 +25,6 @@ public class ReadingTimeExampleBuild extends BaseProject {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY); repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY);
scope(compile) scope(compile)
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", version(1, 9, 20)))
.include(dependency("net.thauvin.erik", "readingtime", version(0, 9, 2, "SNAPSHOT"))); .include(dependency("net.thauvin.erik", "readingtime", version(0, 9, 2, "SNAPSHOT")));
} }
@ -37,11 +36,6 @@ public class ReadingTimeExampleBuild extends BaseProject {
public void compile() throws Exception { public void compile() throws Exception {
new CompileKotlinOperation() new CompileKotlinOperation()
.fromProject(this) .fromProject(this)
.compileOptions(
new CompileKotlinOptions()
.jdkRelease(javaRelease)
.verbose(true)
)
.execute(); .execute();
// Also compile the Java source code // Also compile the Java source code

View file

@ -1,7 +1,7 @@
## Kotlin Example ## Kotlin Example
To compile & run the Kotlin example: To compile & run the Kotlin example:
```text ```console
./gradlew run --args="example.html" ./gradlew run --args="example.html"
``` ```
@ -9,6 +9,6 @@ To compile & run the Kotlin example:
To compile & run the Java example: To compile & run the Java example:
```text ```console
./gradlew runJava --args="example.html" ./gradlew runJava --args="example.html"
``` ```

View file

@ -2,8 +2,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { plugins {
id("application") id("application")
id("com.github.ben-manes.versions") version "0.49.0" id("com.github.ben-manes.versions") version "0.50.0"
kotlin("jvm") version "1.9.20" kotlin("jvm") version "1.9.21"
} }
repositories { repositories {

View file

@ -37,7 +37,7 @@
</developer> </developer>
</developers> </developers>
<scm> <scm>
<connection>scm:git:https://github.com/ethauvin/readingtime</connection> <connection>scm:git:https://github.com/ethauvin/readingtime.git</connection>
<developerConnection>scm:git:git@github.com:ethauvin/readingtime.git</developerConnection> <developerConnection>scm:git:git@github.com:ethauvin/readingtime.git</developerConnection>
<url>https://github.com/ethauvin/readingtime</url> <url>https://github.com/ethauvin/readingtime</url>
</scm> </scm>

View file

@ -33,7 +33,6 @@ package net.thauvin.erik;
import rife.bld.BuildCommand; import rife.bld.BuildCommand;
import rife.bld.Project; import rife.bld.Project;
import rife.bld.extension.CompileKotlinOperation; import rife.bld.extension.CompileKotlinOperation;
import rife.bld.extension.CompileKotlinOptions;
import rife.bld.extension.JacocoReportOperation; import rife.bld.extension.JacocoReportOperation;
import rife.bld.extension.dokka.DokkaOperation; import rife.bld.extension.dokka.DokkaOperation;
import rife.bld.extension.dokka.LoggingLevel; import rife.bld.extension.dokka.LoggingLevel;
@ -82,18 +81,24 @@ public class ReadingTimeBuild extends Project {
.artifactId(name) .artifactId(name)
.description("Estimated Reading Time for Blog Posts, Articles, etc.") .description("Estimated Reading Time for Blog Posts, Articles, etc.")
.url("https://github.com/ethauvin/" + name) .url("https://github.com/ethauvin/" + name)
.developer(new PublishDeveloper() .developer(
.id("ethauvin") new PublishDeveloper()
.name("Erik C. Thauvin") .id("ethauvin")
.email("erik@thauvin.net") .name("Erik C. Thauvin")
.url("https://erik.thauvin.net/")) .email("erik@thauvin.net")
.license(new PublishLicense() .url("https://erik.thauvin.net/")
.name("BSD 3-Clause") )
.url("https://opensource.org/licenses/BSD-3-Clause")) .license(
.scm(new PublishScm() new PublishLicense()
.connection("scm:git:https://github.com/ethauvin/" + name) .name("BSD 3-Clause")
.developerConnection("scm:git:git@github.com:ethauvin/" + name + ".git") .url("https://opensource.org/licenses/BSD-3-Clause")
.url("https://github.com/ethauvin/" + name)) )
.scm(
new PublishScm()
.connection("scm:git:https://github.com/ethauvin/" + name + ".git")
.developerConnection("scm:git:git@github.com:ethauvin/" + name + ".git")
.url("https://github.com/ethauvin/" + name)
)
.signKey(property("sign.key")) .signKey(property("sign.key"))
.signPassphrase(property("sign.passphrase")); .signPassphrase(property("sign.passphrase"));
@ -109,11 +114,6 @@ public class ReadingTimeBuild extends Project {
public void compile() throws IOException { public void compile() throws IOException {
new CompileKotlinOperation() new CompileKotlinOperation()
.fromProject(this) .fromProject(this)
.compileOptions(
new CompileKotlinOptions()
.jdkRelease(javaRelease)
.verbose(true)
)
.execute(); .execute();
} }