Upgraded to Kotlin 1.9.21

This commit is contained in:
Erik C. Thauvin 2023-11-23 17:53:46 -08:00
parent efc0e4954b
commit fad1d06b96
7 changed files with 30 additions and 36 deletions

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/)
[![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/bitly-shorten?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/bitly-shorten/) [![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/bitly-shorten?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/bitly-shorten/)
[![Release](https://img.shields.io/github/release/ethauvin/bitly-shorten.svg)](https://github.com/ethauvin/bitly-shorten/releases/latest) [![Release](https://img.shields.io/github/release/ethauvin/bitly-shorten.svg)](https://github.com/ethauvin/bitly-shorten/releases/latest)
[![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/bitly-shorten.svg?color=blue)](https://central.sonatype.com/artifact/net.thauvin.erik/bitly-shorten) [![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/bitly-shorten.svg?color=blue)](https://central.sonatype.com/artifact/net.thauvin.erik/bitly-shorten)

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 ./bld compile
@ -14,7 +14,7 @@ To compile & run the Kotlin example:
cd cd
To compile & run the Java example: To compile & run the Java example:
```text ```console
./bld compile ./bld compile
./bld run-java --args='https://erik.thauvin.net/ https://bit.ly/2PsNMAA' ./bld run-java --args='https://erik.thauvin.net/ https://bit.ly/2PsNMAA'

View file

@ -1,12 +1,10 @@
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 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;
@ -37,11 +35,6 @@ public class ExampleBuild 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='https://erik.thauvin.net/ https://bit.ly/2PsNMAA' ./gradlew run --args='https://erik.thauvin.net/ https://bit.ly/2PsNMAA'
./gradlew runRetrieve ./gradlew runRetrieve
``` ```
@ -10,6 +10,6 @@ To compile & run the Kotlin example:
To compile & run the Java example: To compile & run the Java example:
```text ```console
./gradlew runJava --args='https://erik.thauvin.net/ https://bit.ly/2PsNMAA' ./gradlew runJava --args='https://erik.thauvin.net/ https://bit.ly/2PsNMAA'
``` ```

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"
} }
// ./gradlew run --args='https://erik.thauvin.net/ https://bit.ly/2PsNMAA' // ./gradlew run --args='https://erik.thauvin.net/ https://bit.ly/2PsNMAA'

View file

@ -18,7 +18,7 @@
<dependency> <dependency>
<groupId>org.jetbrains.kotlin</groupId> <groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId> <artifactId>kotlin-stdlib</artifactId>
<version>1.9.20</version> <version>1.9.21</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -49,7 +49,7 @@
</developer> </developer>
</developers> </developers>
<scm> <scm>
<connection>scm:git:https://github.com/ethauvin/bitly-shorten</connection> <connection>scm:git:https://github.com/ethauvin/bitly-shorten.git</connection>
<developerConnection>scm:git:git@github.com:ethauvin/bitly-shorten.git</developerConnection> <developerConnection>scm:git:git@github.com:ethauvin/bitly-shorten.git</developerConnection>
<url>https://github.com/ethauvin/bitly-shorten</url> <url>https://github.com/ethauvin/bitly-shorten</url>
</scm> </scm>

View file

@ -68,12 +68,12 @@ public class BitlyShortenBuild extends Project {
var okHttp = version(4, 12, 0); var okHttp = version(4, 12, 0);
scope(compile) scope(compile)
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", version(1, 9, 20))) .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", version(1, 9, 21)))
.include(dependency("com.squareup.okhttp3", "okhttp", okHttp)) .include(dependency("com.squareup.okhttp3", "okhttp", okHttp))
.include(dependency("com.squareup.okhttp3", "logging-interceptor", okHttp)) .include(dependency("com.squareup.okhttp3", "logging-interceptor", okHttp))
.include(dependency("org.json", "json", "20231013")); .include(dependency("org.json", "json", "20231013"));
scope(test) scope(test)
.include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", version(1, 9, 20))) .include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", version(1, 9, 21)))
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1))) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1)))
.include(dependency("com.willowtreeapps.assertk", "assertk-jvm", version(0, 27, 0))); .include(dependency("com.willowtreeapps.assertk", "assertk-jvm", version(0, 27, 0)));
@ -88,18 +88,24 @@ public class BitlyShortenBuild extends Project {
.artifactId(name) .artifactId(name)
.description("A simple implementation of the Bitly link shortening API v4") .description("A simple implementation of the Bitly link shortening API v4")
.url("https://github.com/ethauvin/" + name) .url("https://github.com/ethauvin/" + name)
.developer(new PublishDeveloper() .developer(
new PublishDeveloper()
.id("ethauvin") .id("ethauvin")
.name("Erik C. Thauvin") .name("Erik C. Thauvin")
.email("erik@thauvin.net") .email("erik@thauvin.net")
.url("https://erik.thauvin.net/")) .url("https://erik.thauvin.net/")
.license(new PublishLicense() )
.license(
new PublishLicense()
.name("BSD 3-Clause") .name("BSD 3-Clause")
.url("https://opensource.org/licenses/BSD-3-Clause")) .url("https://opensource.org/licenses/BSD-3-Clause")
.scm(new PublishScm() )
.connection("scm:git: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") .developerConnection("scm:git:git@github.com:ethauvin/" + name + ".git")
.url("https://github.com/ethauvin/" + name)) .url("https://github.com/ethauvin/" + name)
)
.signKey(property("sign.key")) .signKey(property("sign.key"))
.signPassphrase(property("sign.passphrase")); .signPassphrase(property("sign.passphrase"));
@ -115,11 +121,6 @@ public class BitlyShortenBuild 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();
} }