Updates! And commas in /osrsitem prices

This commit is contained in:
Anthony Cicchetti 2022-07-23 12:20:18 -04:00
parent 0ce4762f75
commit cfefff1f61
9 changed files with 45 additions and 38 deletions

3
.gitignore vendored
View file

@ -1,3 +1,4 @@
# Project exclude paths
/.gradle/
/build/
/build/
/.idea/

View file

@ -12,11 +12,9 @@ buildscript {
}
}
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("com.github.johnrengelman.shadow") version Libs.com_github_johnrengelman_shadow_gradle_plugin
kotlin("jvm") version Libs.org_jetbrains_kotlin_jvm_gradle_plugin
kotlin("jvm")
application
}
@ -37,7 +35,7 @@ dependencies {
because("CVE-2021-44228, CVE-2021-45046, CVE-2021-45105: Log4j vulnerable to remote code execution and other critical security vulnerabilities")
}
}
implementation(kotlin("stdlib-jdk8"))
implementation(Kotlin.stdlib.jdk8)
implementation(Libs.javalin)
implementation(Libs.javalin_openapi)
implementation(Libs.slf4j_simple)
@ -53,12 +51,12 @@ dependencies {
}
application {
mainClassName = "com.anthonycicchetti.slackbot.MainKt"
mainClass.set("com.anthonycicchetti.slackbot.MainKt")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

View file

@ -16,8 +16,12 @@ plugins {
`kotlin-dsl`
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
repositories {
mavenCentral()
}
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

View file

@ -1,6 +1,9 @@
pluginManagement {
repositories {
gradlePluginPortal()
}
plugins {
id("de.fayard.refreshVersions") version "0.40.0"
id("de.fayard.refreshVersions") version "0.40.2"
}
}

View file

@ -36,14 +36,6 @@ public object Libs {
public const val swagger_core: String = "io.swagger.core.v3:swagger-core:_"
public const val org_jetbrains_kotlin_jvm_gradle_plugin: String =
"org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:_"
public const val kotlin_scripting_compiler_embeddable: String =
"org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:_"
public const val kotlin_stdlib_jdk8: String = "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
public const val junit_jupiter: String = "org.junit.jupiter:junit-jupiter:_"
public const val slf4j_simple: String = "org.slf4j:slf4j-simple:_"

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View file

@ -1,8 +1,11 @@
rootProject.name = "slackmemes"
pluginManagement {
repositories {
gradlePluginPortal()
}
plugins {
id("de.fayard.refreshVersions") version "0.40.0"
id("de.fayard.refreshVersions") version "0.40.2"
}
}

View file

@ -3,6 +3,7 @@ package com.anthonycicchetti.slackbot.utility
import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.databind.ObjectMapper
import com.slack.api.model.kotlin_extension.block.withBlocks
import java.text.NumberFormat
data class BlockResponse(val status: Int = 200, val itemName: String, val highVal: Int, val lowVal: Int) {
val response: String
@ -13,8 +14,8 @@ data class BlockResponse(val status: Int = 200, val itemName: String, val highVa
withBlocks {
section { markdownText("Item Found: ${itemName}") }
divider()
section { markdownText(":chart_with_upwards_trend:: $highVal") }
section { markdownText(":chart_with_downwards_trend:: $lowVal") }
section { markdownText(":chart_with_upwards_trend:: ${NumberFormat.getNumberInstance().format(highVal)}") }
section { markdownText(":chart_with_downwards_trend:: ${NumberFormat.getNumberInstance().format(lowVal)}") }
divider()
section { markdownText("<https://oldschool.runescape.wiki/?search=${itemName.replace(' ', '+')}&title=Special%3ASearch&go=Go|Wiki Search>")}
}

View file

@ -1,5 +1,5 @@
#### Dependencies and Plugin versions with their available updates.
#### Generated by `./gradlew refreshVersions` version 0.40.0
#### Generated by `./gradlew refreshVersions` version 0.40.2
####
#### Don't manually edit or split the comments that start with four hashtags (####),
#### they will be overwritten by refreshVersions.
@ -7,35 +7,38 @@
#### suppress inspection "SpellCheckingInspection" for whole file
#### suppress inspection "UnusedProperty" for whole file
plugin.com.github.johnrengelman.shadow=7.1.1
plugin.com.github.johnrengelman.shadow=7.1.2
plugin.org.gradle.kotlin.kotlin-dsl=2.1.7
plugin.de.fayard.buildSrcLibs=0.40.2
plugin.de.fayard.buildSrcLibs=0.40.0
plugin.org.gradle.kotlin.kotlin-dsl=2.4.1
version.com.fasterxml.jackson.core..jackson-databind=2.13.0
version.com.fasterxml.jackson.core..jackson-databind=2.13.3
version.com.fasterxml.jackson.module..jackson-module-kotlin=2.13.0
version.com.fasterxml.jackson.module..jackson-module-kotlin=2.13.3
version.com.github.kittinunf.fuel..fuel-jackson=2.3.1
version.com.github.kittinunf.fuel..fuel=2.3.1
version.com.slack.api..slack-api-model-kotlin-extension=1.17.0
version.com.slack.api..slack-api-model-kotlin-extension=1.24.0
version.io.javalin..javalin=4.1.1
version.io.javalin..javalin=4.6.4
version.io.javalin..javalin-openapi=4.1.1
version.io.javalin..javalin-openapi=4.6.4
version.io.swagger.core.v3..swagger-core=2.1.11
version.io.swagger.core.v3..swagger-core=2.2.2
## unused
version.junit=5.8.2
version.junit.jupiter=5.8.2
## # available=5.9.0-M1
## # available=5.9.0-RC1
version.kotlin=1.6.10
version.kotlin=1.7.10
version.org.slf4j..slf4j-simple=1.7.32
version.org.slf4j..slf4j-simple=1.7.36
## # available=1.8.0-alpha0
## # available=1.8.0-alpha1
## # available=1.8.0-alpha2
@ -49,5 +52,7 @@ version.org.slf4j..slf4j-simple=1.7.32
## # available=2.0.0-alpha3
## # available=2.0.0-alpha4
## # available=2.0.0-alpha5
## # available=2.0.0-alpha6
## # available=2.0.0-alpha7
version.org.webjars..swagger-ui=4.1.3
version.org.webjars..swagger-ui=4.11.1