diff --git a/.circleci/config.yml b/.circleci/config.yml index 9586fcd..c781fdc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,7 +24,7 @@ commands: version: 2.1.10 - run: name: Download dependencies - command: ./bld -Djitpack.token=$JITPACK_TOKEN download + command: ./bld download - run: name: Compile source command: ./bld compile diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index 5b88e5a..8e7d939 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -41,7 +41,7 @@ jobs: run: ./bld download - name: Compile source - run: ./bld -Djitpack.token=${{ secrets.JITPACK_TOKEN }} compile + run: ./bld compile - name: Run tests run: ./bld jacoco diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a2a4384..10b9b0f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,6 +19,6 @@ before_script: test: stage: test script: - - ./bld -Djitpack.token=$JITPACK_TOKEN download + - ./bld download - ./bld compile - ./bld test diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 132ed8d..ace99d2 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -15,6 +15,6 @@ pipelines: - sdk install kotlin - source "$HOME/.sdkman/bin/sdkman-init.sh" # Download, compile and test with bld - - ./bld -Djitpack.token=$JITPACK_TOKEN download + - ./bld download - ./bld compile - ./bld test diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 8b96558..4986847 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -1,9 +1,9 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= -bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.10-SNAPSHOT -bld.extension-gv=com.uwyn.rife2:bld-generated-version:1.0.1 -bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.10 +bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.9 +bld.extension-gv=com.uwyn.rife2:bld-generated-version:1.0.0 +bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.9 bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.1.0-SNAPSHOT bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= diff --git a/src/bld/java/net/thauvin/erik/MobibotBuild.java b/src/bld/java/net/thauvin/erik/MobibotBuild.java index e4da3b1..c2c5f38 100644 --- a/src/bld/java/net/thauvin/erik/MobibotBuild.java +++ b/src/bld/java/net/thauvin/erik/MobibotBuild.java @@ -39,6 +39,7 @@ import rife.bld.extension.DetektOperation; import rife.bld.extension.GeneratedVersionOperation; import rife.bld.extension.JacocoReportOperation; import rife.bld.extension.kotlin.CompileOptions; +import rife.bld.extension.kotlin.JvmOptions; import rife.bld.operations.exceptions.ExitStatusException; import rife.bld.publish.PomBuilder; import rife.tools.FileUtils; @@ -51,9 +52,6 @@ import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.List; import java.util.jar.Attributes; -import java.util.logging.ConsoleHandler; -import java.util.logging.Level; -import java.util.logging.Logger; import static rife.bld.dependencies.Repository.*; import static rife.bld.dependencies.Scope.compile; @@ -67,7 +65,7 @@ public class MobibotBuild extends Project { pkg = "net.thauvin.erik.mobibot"; name = "mobibot"; version = version(0, 8, 0, "rc+" + - DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now())); + DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now())); mainClass = pkg + ".Mobibot"; @@ -77,7 +75,7 @@ public class MobibotBuild extends Project { repositories = List.of( MAVEN_LOCAL, MAVEN_CENTRAL, - new Repository("https://jitpack.io").withCredentials(property("jitpack.token"), "."), + new Repository("https://jitpack.io"), SONATYPE_SNAPSHOTS_LEGACY); var log4j = version(2, 24, 3); @@ -88,18 +86,18 @@ public class MobibotBuild extends Project { .include(dependency("com.github.pircbotx", "pircbotx", "2.3.1")) // Commons (mostly for PircBotX) .include(dependency("org.apache.commons", "commons-lang3", "3.17.0")) - .include(dependency("org.apache.commons", "commons-text", "1.13.1")) + .include(dependency("org.apache.commons", "commons-text", "1.13.0")) .include(dependency("commons-codec", "commons-codec", "1.18.0")) .include(dependency("commons-net", "commons-net", "3.11.1")) // Google - .include(dependency("com.google.code.gson", "gson", "2.13.0")) + .include(dependency("com.google.code.gson", "gson", "2.12.1")) .include(dependency("com.google.guava", "guava", "33.2.1-jre")) // Kotlin .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)) .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-common", kotlin)) .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk7", kotlin)) .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk8", kotlin)) - .include(dependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.10.2")) + .include(dependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.10.1")) .include(dependency("org.jetbrains.kotlinx", "kotlinx-cli-jvm", "0.3.6")) // Logging .include(dependency("org.slf4j", "slf4j-api", "2.0.17")) @@ -126,9 +124,9 @@ public class MobibotBuild extends Project { scope(test) .include(dependency("com.willowtreeapps.assertk", "assertk-jvm", version(0, 28, 1))) .include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin)) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 2))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 2))) - .include(dependency("org.junit.platform", "junit-platform-launcher", version(1, 12, 2))); + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 1))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 1))) + .include(dependency("org.junit.platform", "junit-platform-launcher", version(1, 12, 1))); List jars = new ArrayList<>(); runtimeClasspathJars().forEach(f -> jars.add("./lib/" + f.getName())); @@ -141,15 +139,6 @@ public class MobibotBuild extends Project { } public static void main(String[] args) { - var level = Level.ALL; - var logger = Logger.getLogger("rife.bld.extension"); - var consoleHandler = new ConsoleHandler(); - - consoleHandler.setLevel(level); - logger.addHandler(consoleHandler); - logger.setLevel(level); - logger.setUseParentHandlers(false); - new MobibotBuild().start(args); } @@ -166,8 +155,10 @@ public class MobibotBuild extends Project { @Override public void compile() throws Exception { releaseInfo(); + var options = new CompileOptions().verbose(true); + options.jvmOptions().enableNativeAccess(JvmOptions.ALL_UNNAMED); new CompileKotlinOperation() - .compileOptions(new CompileOptions().progressive(true).verbose(true)) + .compileOptions(options) .fromProject(this) .execute(); } diff --git a/src/main/kotlin/net/thauvin/erik/mobibot/modules/CryptoPrices.kt b/src/main/kotlin/net/thauvin/erik/mobibot/modules/CryptoPrices.kt index 3334a90..2186d73 100644 --- a/src/main/kotlin/net/thauvin/erik/mobibot/modules/CryptoPrices.kt +++ b/src/main/kotlin/net/thauvin/erik/mobibot/modules/CryptoPrices.kt @@ -52,7 +52,7 @@ class CryptoPrices : AbstractModule() { /** * Returns the cryptocurrency market price from - * [Coinbase](https://docs.cdp.coinbase.com/coinbase-app/docs/api-prices#get-spot-price). + * [Coinbase](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-spot-price). */ override fun commandResponse(channel: String, cmd: String, args: String, event: GenericMessageEvent) { if (CURRENCIES.isEmpty()) { diff --git a/src/test/kotlin/net/thauvin/erik/mobibot/modules/CryptoPricesTest.kt b/src/test/kotlin/net/thauvin/erik/mobibot/modules/CryptoPricesTest.kt index 94a40d9..34b8369 100644 --- a/src/test/kotlin/net/thauvin/erik/mobibot/modules/CryptoPricesTest.kt +++ b/src/test/kotlin/net/thauvin/erik/mobibot/modules/CryptoPricesTest.kt @@ -39,9 +39,6 @@ import net.thauvin.erik.crypto.CryptoPrice import net.thauvin.erik.mobibot.modules.CryptoPrices.Companion.currentPrice import net.thauvin.erik.mobibot.modules.CryptoPrices.Companion.getCurrencyName import net.thauvin.erik.mobibot.modules.CryptoPrices.Companion.loadCurrencies -import org.junit.jupiter.api.BeforeAll -import java.util.logging.ConsoleHandler -import java.util.logging.Level import kotlin.test.Test class CryptoPricesTest { @@ -72,16 +69,4 @@ class CryptoPricesTest { assertThat(getCurrencyName("USD"), "USD").isEqualTo("United States Dollar") assertThat(getCurrencyName("EUR"), "EUR").isEqualTo("Euro") } - - companion object { - @JvmStatic - @BeforeAll - fun beforeAll() { - with(CryptoPrice.logger) { - addHandler(ConsoleHandler().apply { level = Level.FINE }) - level = Level.FINE - useParentHandlers = false - } - } - } }