Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring #9

Merged
merged 14 commits into from
Dec 10, 2023
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ logs/*
*hs_err_pid*.log

# secret files
*sneaky.yaml

# some development environment stuff, these makes intellij ultimate's persistence stuff work
*hibernate.cfg.xml
*persistence.xml
icu-secrets.yaml

# common symlinks
icu.jar
Expand Down
38 changes: 21 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ plugins {
id 'java'
id 'application'
alias(libs.plugins.gitprops)
alias(libs.plugins.shadow)
alias(libs.plugins.spring)
alias(libs.plugins.versions)
}

group 'space.npstr.icu'
version '0.1.0-SNAPSHOT'

mainClassName = 'space.npstr.icu.Main'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
Expand All @@ -34,29 +32,35 @@ repositories {


dependencies {
//@formatter:off
implementation platform(libs.spring.boot.bom)

implementation libs.spring.boot.starter
implementation libs.spring.boot.starter.data.jpa

implementation libs.jda
implementation libs.logback
implementation libs.sentry
implementation libs.sentry.spring.starter
implementation libs.yaml
implementation libs.sqlsauce.core
implementation libs.sqlsauce.discord
implementation libs.hibernate.jcache
implementation libs.caffeine.jcache
implementation libs.annotations
implementation libs.jaxb
implementation libs.dsproxy

//@formatter:on
runtimeOnly libs.postgresql
implementation libs.caffeine
compileOnly libs.findbugs // to avoid warning about some missing annotations
}

compileJava.dependsOn 'clean'
compileJava.options.encoding = 'UTF-8'
compileJava.options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
tasks.withType(JavaCompile).configureEach {
dependsOn(processResources)
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}

shadowJar {
bootJar {
archiveFileName.set("icu.jar")
doLast {
copy {
from 'build/libs/icu.jar'
into '.'
}
}
}

processResources {
Expand Down
35 changes: 22 additions & 13 deletions buildscript-gradle.lockfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.fasterxml.jackson.core:jackson-annotations:2.14.2=classpath
com.fasterxml.jackson.core:jackson-core:2.14.2=classpath
com.fasterxml.jackson.core:jackson-databind:2.14.2=classpath
com.fasterxml.jackson.module:jackson-module-parameter-names:2.14.2=classpath
com.fasterxml.jackson:jackson-bom:2.14.2=classpath
com.github.ben-manes.versions:com.github.ben-manes.versions.gradle.plugin:0.50.0=classpath
com.github.ben-manes:gradle-versions-plugin:0.50.0=classpath
com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:8.1.1=classpath
com.github.johnrengelman:shadow:8.1.1=classpath
com.google.code.findbugs:jsr305:3.0.2=classpath
com.gorylenko.gradle-git-properties:com.gorylenko.gradle-git-properties.gradle.plugin:2.4.1=classpath
com.gorylenko.gradle-git-properties:gradle-git-properties:2.4.1=classpath
com.squareup.moshi:moshi-kotlin:1.12.0=classpath
com.squareup.moshi:moshi:1.12.0=classpath
com.squareup.okhttp3:okhttp:4.11.0=classpath
com.squareup.okio:okio-jvm:3.2.0=classpath
com.squareup.okio:okio:3.2.0=classpath
commons-io:commons-io:2.11.0=classpath
org.apache.ant:ant-launcher:1.10.13=classpath
org.apache.ant:ant:1.10.13=classpath
org.apache.logging.log4j:log4j-api:2.20.0=classpath
org.apache.logging.log4j:log4j-core:2.20.0=classpath
org.codehaus.plexus:plexus-utils:3.5.1=classpath
org.jdom:jdom2:2.0.6.1=classpath
io.spring.gradle:dependency-management-plugin:1.1.4=classpath
net.java.dev.jna:jna-platform:5.13.0=classpath
net.java.dev.jna:jna:5.13.0=classpath
org.antlr:antlr4-runtime:4.7.2=classpath
org.apache.commons:commons-compress:1.23.0=classpath
org.apache.httpcomponents.client5:httpclient5:5.2.1=classpath
org.apache.httpcomponents.core5:httpcore5-h2:5.2=classpath
org.apache.httpcomponents.core5:httpcore5:5.2=classpath
org.jetbrains.kotlin:kotlin-reflect:1.8.20=classpath
org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.21=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21=classpath
org.jetbrains.kotlin:kotlin-stdlib:1.8.21=classpath
org.jetbrains:annotations:13.0=classpath
org.ow2.asm:asm-commons:9.4=classpath
org.ow2.asm:asm-tree:9.4=classpath
org.ow2.asm:asm:9.4=classpath
org.vafer:jdependency:2.8.0=classpath
org.slf4j:slf4j-api:1.7.36=classpath
org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.0=classpath
org.springframework.boot:spring-boot-buildpack-platform:3.2.0=classpath
org.springframework.boot:spring-boot-gradle-plugin:3.2.0=classpath
org.springframework.boot:spring-boot-loader-tools:3.2.0=classpath
org.springframework:spring-core:6.0.10=classpath
org.springframework:spring-jcl:6.0.10=classpath
org.tomlj:tomlj:1.0.0=classpath
empty=
6 changes: 3 additions & 3 deletions docker/deploy-icu/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ version: '3.6'
services:

db:
image: napstr/poggres:15
image: napstr/poggres:16
restart: always
volumes:
- ./postgres-data/15/data:/var/lib/postgresql/data
- ./postgres-data/16/data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=icu
# See https://github.com/napstr/poggres#env-vars
Expand All @@ -20,7 +20,7 @@ services:
depends_on:
- db
volumes:
- ./sneaky.yaml:/opt/icu/sneaky.yaml
- ./icu-secrets.yaml:/opt/icu/icu-secrets.yaml:ro
- ./logs:/opt/icu/logs
- ./logs/gc:/opt/icu/logs/gc
ports:
Expand Down
4 changes: 2 additions & 2 deletions docker/dev-icu/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ version: '3.6'
services:

db:
image: napstr/poggres:15
image: napstr/poggres:16
restart: always
ports:
- 127.0.0.1:5433:5432
volumes:
- ./postgres-data/15/data:/var/lib/postgresql/data
- ./postgres-data/16/data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=icu
# See https://github.com/napstr/poggres#env-vars
Expand Down
Loading