Use consistent project name variable
Refactor project to use a constant variable for the repository name. This ensures consistency and reduces the risk of errors when referencing the project name in multiple places. Updates were made in settings.gradle.kts, .gitea/template, and Main.kt to use the REPO_NAME variable.
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
# Repo name
|
||||
settings.gradle.kts
|
||||
**.kt
|
||||
@@ -1,4 +1,5 @@
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"
|
||||
}
|
||||
rootProject.name = "{{.RepoName}}"
|
||||
val REPO_NAME = "template"
|
||||
rootProject.name = "${REPO_NAME}"
|
||||
|
||||
@@ -25,7 +25,7 @@ fun main() {
|
||||
Class.forName("nl.astraeus.jdbc.Driver")
|
||||
Database.initialize(HikariConfig().apply {
|
||||
driverClassName = "nl.astraeus.jdbc.Driver"
|
||||
jdbcUrl = "jdbc:stat:webServerPort=6001:jdbc:sqlite:data/{{.RepoName}}.db"
|
||||
jdbcUrl = "jdbc:stat:webServerPort=6001:jdbc:sqlite:data/${REPO_NAME}.db"
|
||||
username = "sa"
|
||||
password = ""
|
||||
maximumPoolSize = 25
|
||||
|
||||
Reference in New Issue
Block a user