Skip to content

Commit

Permalink
Upgraded to Kotlin 1.9.21
Browse files Browse the repository at this point in the history
  • Loading branch information
ethauvin committed Nov 24, 2023
1 parent 21b4af2 commit 1e016de
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 627 deletions.
2 changes: 2 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions .settings/org.eclipse.buildship.core.prefs

This file was deleted.

576 changes: 0 additions & 576 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)
[![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/cryptoprice.svg)](https://github.com/ethauvin/cryptoprice/releases/latest)
[![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/cryptoprice)](https://central.sonatype.com/artifact/net.thauvin.erik/cryptoprice)
[![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/cryptoprice?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/cryptoprice/)
Expand Down
4 changes: 2 additions & 2 deletions examples/bld/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Kotlin Example
To compile & run the Kotlin example:

```text
```console
./bld compile

./bld run
Expand All @@ -13,7 +13,7 @@ To compile & run the Kotlin example:

To compile & run the Java example:

```text
```console
./bld compile

./bld run-java
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.example;

import rife.bld.BaseProject;
import rife.bld.BuildCommand;
import rife.bld.extension.CompileKotlinOperation;
import rife.bld.extension.CompileKotlinOptions;
import rife.bld.operations.RunOperation;
import rife.bld.BaseProject;

import java.util.List;

Expand All @@ -26,7 +25,6 @@ public CryptoPriceExampleBuild() {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY);

scope(compile)
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", version(1, 9, 20)))
.include(dependency("net.thauvin.erik", "cryptoprice", version(1, 0, 2, "SNAPSHOT")))
.include(dependency("org.json", "json", "20231013"));
}
Expand All @@ -39,11 +37,6 @@ public static void main(String[] args) {
public void compile() throws Exception {
new CompileKotlinOperation()
.fromProject(this)
.compileOptions(
new CompileKotlinOptions()
.jdkRelease(javaRelease)
.verbose(true)
)
.execute();

// Also compile the Java source code
Expand Down
4 changes: 2 additions & 2 deletions examples/gradle/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Kotlin Example
To compile & run the Kotlin example:

```text
```console
./gradlew run
./gradlew run --args="btc"
./gradlew run --args="eth eur"
Expand All @@ -11,7 +11,7 @@ To compile & run the Kotlin example:

To compile & run the Java example:

```text
```console
./gradlew runJava
./gradlew runJava --args="btc"
./gradlew runJava --args="eth eur"
Expand Down
4 changes: 2 additions & 2 deletions examples/gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("application")
id("com.github.ben-manes.versions") version "0.49.0"
kotlin("jvm") version "1.9.20"
id("com.github.ben-manes.versions") version "0.50.0"
kotlin("jvm") version "1.9.21"
}

defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.9.20</version>
<version>1.9.21</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand All @@ -43,7 +43,7 @@
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/ethauvin/cryptoprice</connection>
<connection>scm:git:https://github.com/ethauvin/cryptoprice.git</connection>
<developerConnection>scm:git:git@github.com:ethauvin/cryptoprice.git</developerConnection>
<url>https://github.com/ethauvin/cryptoprice</url>
</scm>
Expand Down
42 changes: 21 additions & 21 deletions src/bld/java/net/thauvin/erik/crypto/CryptoPriceBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import rife.bld.BuildCommand;
import rife.bld.Project;
import rife.bld.extension.CompileKotlinOperation;
import rife.bld.extension.CompileKotlinOptions;
import rife.bld.extension.JacocoReportOperation;
import rife.bld.extension.dokka.DokkaOperation;
import rife.bld.extension.dokka.LoggingLevel;
Expand Down Expand Up @@ -37,12 +36,12 @@ public CryptoPriceBuild() {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);

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("org.json", "json", "20231013"))
.include(dependency("com.squareup.okhttp3", "okhttp", version(4, 12, 0)));
scope(test)
.include(dependency("com.willowtreeapps.assertk", "assertk-jvm", version(0, 27, 0)))
.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.platform", "junit-platform-console-standalone", version(1, 10, 1)));

Expand All @@ -56,18 +55,24 @@ public CryptoPriceBuild() {
.artifactId(name)
.description("Retrieve cryptocurrencies prices")
.url("https://github.com/ethauvin/" + name)
.developer(new PublishDeveloper()
.id("ethauvin")
.name("Erik C. Thauvin")
.email("erik@thauvin.net")
.url("https://erik.thauvin.net/"))
.license(new PublishLicense()
.name("BSD 3-Clause")
.url("https://opensource.org/licenses/BSD-3-Clause"))
.scm(new PublishScm()
.connection("scm:git:https://github.com/ethauvin/" + name)
.developerConnection("scm:git:git@github.com:ethauvin/" + name + ".git")
.url("https://github.com/ethauvin/" + name))
.developer(
new PublishDeveloper()
.id("ethauvin")
.name("Erik C. Thauvin")
.email("erik@thauvin.net")
.url("https://erik.thauvin.net/")
)
.license(
new PublishLicense()
.name("BSD 3-Clause")
.url("https://opensource.org/licenses/BSD-3-Clause")
)
.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"))
.signPassphrase(property("sign.passphrase"));

Expand All @@ -83,11 +88,6 @@ public static void main(final String[] args) {
public void compile() throws IOException {
new CompileKotlinOperation()
.fromProject(this)
.compileOptions(
new CompileKotlinOptions()
.jdkRelease(javaRelease)
.verbose(true)
)
.execute();
}

Expand Down Expand Up @@ -121,4 +121,4 @@ public void pomRoot() throws FileUtilsErrorException {
PomBuilder.generateInto(publishOperation().fromProject(this).info(), dependencies(),
new File(workDirectory, "pom.xml"));
}
}
}

0 comments on commit 1e016de

Please sign in to comment.