diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml
index 27eddc8a..238c96e3 100644
--- a/.github/workflows/gradle.yml
+++ b/.github/workflows/gradle.yml
@@ -1,25 +1,25 @@
name: Run Gradle on PRs
permissions: read-all
-on:
- push:
- branches: [master]
- pull_request:
- branches: [master]
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
jobs:
- gradle:
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest, windows-latest]
- runs-on: ${{ matrix.os }}
- steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-java@v3
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Run test and Coverage
- uses: gradle/gradle-build-action@v2
- with:
- gradle-version: wrapper
- arguments: reportScoverage aggregateAllTestReports -no-daemon
+ gradle:
+ strategy:
+ matrix:
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
+ with:
+ distribution: "temurin"
+ java-version: "17"
+ - name: Run test and Coverage
+ uses: gradle/gradle-build-action@v2
+ with:
+ gradle-version: wrapper
+ arguments: reportScoverage aggregateAllTestReports -no-daemon
diff --git a/.github/workflows/todo-issues.yml b/.github/workflows/todo-issues.yml
index 345d4c2c..010048b2 100644
--- a/.github/workflows/todo-issues.yml
+++ b/.github/workflows/todo-issues.yml
@@ -1,5 +1,4 @@
name: Create issues from todos
-permissions: read-all
on:
push:
diff --git a/.swm/monster-manuals.2sgmr3sq.sw.md b/.swm/monster-manuals.2sgmr3sq.sw.md
new file mode 100644
index 00000000..7a947a0c
--- /dev/null
+++ b/.swm/monster-manuals.2sgmr3sq.sw.md
@@ -0,0 +1,22 @@
+---
+id: 2sgmr3sq
+title: Monster Manuals
+file_version: 1.1.3
+app_version: 1.17.0
+---
+
+Basic Monster Type information will be located in the io.truthencode.ddo.model.compendium package.
+
+Ultimately, Entry, Type, Race and Sub-races should be applied. Although Monster Manual may not directly affect combat stats.
+
+
+
+| Monster Manual Entry | Type | Race | Sub-races |
+| -------------------- | ------------- | ----------- | --------- |
+| Elf | Elf | Elf | Drow Elf |
+| Purple Worm | Magical Beast | Purple Worm |
|
+|
|
|
|
|
+
+
+
+This file was generated by Swimm. [Click here to view it in the app](https://app.swimm.io/repos/Z2l0aHViJTNBJTNBZGRvLWNhbGMlM0ElM0F0cnV0aGVuY29kZQ==/docs/2sgmr3sq).
diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml
index 1fa2b3a0..c21e89cc 100644
--- a/.trunk/trunk.yaml
+++ b/.trunk/trunk.yaml
@@ -1,6 +1,6 @@
version: 0.1
cli:
- version: 1.15.0
+ version: 1.16.0
plugins:
sources:
@@ -13,18 +13,18 @@ lint:
- terrascan@1.18.3
- checkov@2.4.9
- osv-scanner@1.4.0
- - trivy@0.45.0
- - trufflehog@3.56.0
+ - trivy@0.45.1
+ - trufflehog@3.56.1
- taplo@0.8.1
- actionlint@1.6.25
- dotenv-linter@3.3.0
- git-diff-check
- gitleaks@8.18.0
- ktlint@1.0.0
- - markdownlint@0.36.0
+ - markdownlint@0.37.0
- oxipng@8.0.0
- prettier@3.0.3
- - renovate@36.93.7
+ - renovate@36.97.3
- scalafmt@3.7.14
- shellcheck@0.9.0
- shfmt@3.6.0
diff --git a/build-logic/src/main/kotlin/code-quality.gradle.kts b/build-logic/src/main/kotlin/code-quality.gradle.kts
index 51cf9e1d..e7be2d74 100644
--- a/build-logic/src/main/kotlin/code-quality.gradle.kts
+++ b/build-logic/src/main/kotlin/code-quality.gradle.kts
@@ -141,5 +141,4 @@ configure {
licenseHeaderFile(project.rootProject.file("gradle/LICENSE_HEADER_SPOTLESS"), "package")
}
}
-}
-
+}
\ No newline at end of file
diff --git a/build-logic/src/main/kotlin/djaxonomy.java-coverage-conventions.gradle.kts b/build-logic/src/main/kotlin/djaxonomy.java-coverage-conventions.gradle.kts
new file mode 100644
index 00000000..c8f2a3c8
--- /dev/null
+++ b/build-logic/src/main/kotlin/djaxonomy.java-coverage-conventions.gradle.kts
@@ -0,0 +1,23 @@
+plugins {
+ jacoco
+}
+/*
+
+Java's (jacoco) and Kotlin at this time.
+Scala will utilize scoverage instead.
+(Scala's coverage is available in scala-conventions.
+NOTICE: You must still include a kotlin app / library etc. profile as we do not auto-include kotlin / java library conventions here.
+ */
+
+jacoco {
+ toolVersion = "0.8.10"
+// reportsDirectory.set(layout.buildDirectory.dir("customJacocoReportDir"))
+}
+
+tasks.withType(JacocoReport::class) {
+ reports {
+ xml.required.set(false)
+ csv.required.set(false)
+// html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml"))
+ }
+}
\ No newline at end of file
diff --git a/build-logic/src/main/kotlin/djaxonomy.kotlin-coverage-conventions.gradle.kts b/build-logic/src/main/kotlin/djaxonomy.kotlin-coverage-conventions.gradle.kts
new file mode 100644
index 00000000..caf5620b
--- /dev/null
+++ b/build-logic/src/main/kotlin/djaxonomy.kotlin-coverage-conventions.gradle.kts
@@ -0,0 +1,11 @@
+plugins {
+ id("djaxonomy.java-coverage-conventions")
+}
+
+/*
+There is no kotlin specific coverage tool at this time.
+We're just using Java's (jacoco)
+Scala will utilize scoverage instead.
+
+NOTICE: You must still include a kotlin app / library etc. profile as we do not auto-include kotlin / java library conventions here.
+ */
\ No newline at end of file
diff --git a/build-logic/src/main/kotlin/djaxonomy.kotlin-test-conventions.gradle.kts b/build-logic/src/main/kotlin/djaxonomy.kotlin-test-conventions.gradle.kts
index ef089237..d177a41e 100644
--- a/build-logic/src/main/kotlin/djaxonomy.kotlin-test-conventions.gradle.kts
+++ b/build-logic/src/main/kotlin/djaxonomy.kotlin-test-conventions.gradle.kts
@@ -22,6 +22,7 @@ import io.truthencode.djaxonomy.etc.TestBuildSupport
plugins {
id("djaxonomy.test-conventions")
+ id("djaxonomy.kotlin-coverage-conventions")
}
val koTestVersion: String by project
diff --git a/build-logic/src/main/kotlin/djaxonomy.test-conventions.gradle.kts b/build-logic/src/main/kotlin/djaxonomy.test-conventions.gradle.kts
index 727a3531..319d1dd7 100644
--- a/build-logic/src/main/kotlin/djaxonomy.test-conventions.gradle.kts
+++ b/build-logic/src/main/kotlin/djaxonomy.test-conventions.gradle.kts
@@ -27,17 +27,43 @@ plugins {
}
tasks.withType(Test::class.java) {
+
systemProperties["concordion.output.dir"] = "${reporting.baseDir}/tests"
val outputDir = reports.junitXml.outputLocation
- jvmArgumentProviders.add(CommandLineArgumentProvider {
- mutableListOf(
- "-Djunit.platform.reporting.open.xml.enabled=false", // Legacy format for sonar
- "-Djunit.platform.reporting.output.dir=${outputDir.get().asFile.absolutePath}"
- )
- })
-}
+ val extraProps = mutableListOf("-Djunit.platform.reporting.output.dir=${outputDir.get().asFile.absolutePath}")
+
+ jvmArgumentProviders.add(
+ CommandLineArgumentProvider {
+ extraProps.plus(
+ listOf(
+ "-Djunit.platform.reporting.open.xml.enabled=false", // Legacy format for sonar
+ ),
+ )
+ },
+ )
+}
+sonar {
+ properties {
+ if (project.plugins.hasPlugin("scala")) {
+ val rPath =
+ listOf(
+ "scoverageAcceptanceTest/scoverage.xml",
+ "scoverage/scoverage.xml",
+ ).joinToString()
+ property("sonar.scala.coverage.reportPaths", rPath)
+ } else {
+ // use Jacoco
+ // sonar.coverage.jacoco.xmlReportPaths
+ }
+ val junitPaths =
+ listOf("test-results/test", "test-results/acceptanceTest").joinToString {
+ project.layout.buildDirectory.dir(it).get().asFile.path
+ }
+ property("sonar.junit.reportPaths", junitPaths)
+ }
+}
val libs = the()
val extension = project.extensions.create("KotlinTestKits")
@@ -67,7 +93,7 @@ fun JvmTestSuite.applyConcordionAcceptanceTest() {
dependencies {
implementation(project())
implementation(libs.concordion)
- // flexmark (mostly for concordion / markdown)
+// flexmark (mostly for concordion / markdown)
implementation(libs.flexmark.all)
}
}
@@ -97,7 +123,7 @@ fun JvmTestSuite.applyJupiterEngine() {
fun JvmTestSuite.applyScalaTest() {
dependencies {
runtimeOnly(libs.scalatest.plus.junit)
- // runtimeOnly("org.junit.vintage:junit-vintage-engine:5.10.0")
+// runtimeOnly("org.junit.vintage:junit-vintage-engine:5.10.0")
implementation(libs.scalatest.s213)
implementation(libs.scalatest.plus.mockito.s213)
@@ -106,7 +132,7 @@ fun JvmTestSuite.applyScalaTest() {
implementation(libs.wix.accord.scalatest.s213)
implementation(libs.scalatest.plus.scalacheck)
- // JUnit
+// JUnit
}
targets.all {
@@ -123,13 +149,13 @@ fun JvmTestSuite.applyScalaTest() {
project.testing {
suites {
- /*
- TODO: Add functional / integration etc as needed
- Also need to determine if this is a limited scope (i.e opt in by project)
- integrationTest by registering(JvmTestSuite::class)
- functionalTest by registering(JvmTestSuite::class)
- performanceTest by registering(JvmTestSuite::class)
- */
+/*
+TODO: Add functional / integration etc as needed
+Also need to determine if this is a limited scope (i.e opt in by project)
+integrationTest by registering(JvmTestSuite::class)
+functionalTest by registering(JvmTestSuite::class)
+performanceTest by registering(JvmTestSuite::class)
+ */
val test by getting(JvmTestSuite::class)
val acceptanceTest = register("acceptanceTest")
@@ -156,7 +182,7 @@ project.testing {
}
}
- // Scala Specific
+// Scala Specific
if (project.plugins.hasPlugin("scala")) {
logger.info("Configuring ${project.name} for Scala ${tt.name} Testing : ${this.name} ")
@@ -179,8 +205,8 @@ project.testing {
targets.all {
testTask.configure {
useJUnitPlatform {
- // includeEngines = setOf("vintage")
- // includeEngines("junit-jupiter", "junit-vintage")
+// includeEngines = setOf("vintage")
+// includeEngines("junit-jupiter", "junit-vintage")
testLogging {
events("passed", "skipped", "failed")
}
@@ -196,11 +222,11 @@ project.testing {
}
}
- // Concordian BDD Acceptance
+// Concordian BDD Acceptance
if (tt == TestTypes.Acceptance) {
logger.info("applying Concordion Acceptance")
- // systemProperties["concordion.output.dir"] = "${reporting.baseDir}/spec"
+// systemProperties["concordion.output.dir"] = "${reporting.baseDir}/spec"
this.applyConcordionAcceptanceTest()
this.applyVintageEngine()
this.applyJupiterEngine()
diff --git a/build-logic/src/main/kotlin/scala-conventions.gradle.kts b/build-logic/src/main/kotlin/scala-conventions.gradle.kts
index c4e251d9..be90dd33 100644
--- a/build-logic/src/main/kotlin/scala-conventions.gradle.kts
+++ b/build-logic/src/main/kotlin/scala-conventions.gradle.kts
@@ -27,14 +27,15 @@ plugins {
}
val libs = the()
-// dependencies {
+dependencies {
+ implementation(libs.scala2.library)
// val scalaLibraryVersion: String by project
// val scalaMajorVersion: String by project
// val scalaCompilerPlugin by configurations.creating
// scalaCompilerPlugin("com.typesafe.genjavadoc:genjavadoc-plugin_$scalaLibraryVersion:0.18")
// compileOnly("org.scoverage:scalac-scoverage-plugin_$scalaMajorVersion.7:1.4.10")
//
-// }
+}
configure {
scoverageVersion.set(libs.versions.scoverage)
diff --git a/build.gradle.kts b/build.gradle.kts
index d53682b1..650d431b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -16,21 +16,16 @@
* limitations under the License.
*/
import com.mooltiverse.oss.nyx.state.State
-
import ru.vyarus.gradle.plugin.python.task.PythonTask
import java.text.SimpleDateFormat
import java.util.*
plugins {
-// id("code-quality")
- // id("org.kordamp.gradle.project")
-// scala apply (false)
id("org.scoverage") apply (false)
// may need node support
// id("node-conventions")
idea
-// id("net.thauvin.erik.gradle.semver")
`maven-publish`
id("com.dorongold.task-tree") version "2.1.0" // Temp until working solution to userhome version script
id("com.github.ManifestClasspath") version "0.1.0-RELEASE"
@@ -40,9 +35,6 @@ plugins {
id("nl.littlerobots.version-catalog-update") version "0.8.1"
id("ru.vyarus.mkdocs")
id("org.sonarqube")
-
-// id("ru.vyarus.mkdocs") version "3.0.0" apply (false)
- // id ("be.vbgn.ci-detect") version "0.1.0"
}
apply(plugin = "org.scoverage")
@@ -100,6 +92,8 @@ val requirementsIn =
)
tasks.register("generateRequirementsIn") {
+ description = "generates a requirements.in dependency file for Python / MkDocs"
+ group = "documentation"
val rIn = layout.projectDirectory.file("requirements.in")
this.outputs.files(rIn)
val rTxt = requirementsIn.joinToString("\n") { it.replace(":", "==") }
@@ -115,6 +109,8 @@ python {
}
tasks.register("dumpSomeDiagnostics") {
+ group = "utility"
+ description = "prints nyx plugin state information"
dependsOn(project.tasks.named("nyxInfer"))
doLast {
if (project.hasProperty("nyxState")) {
@@ -130,6 +126,8 @@ tasks.register("dumpSomeDiagnostics") {
// Currently need to manually verify this matches mkdocs.yml value
tasks.register("syncDocVersion", PythonTask::class) {
+ group = "documentation"
+ description = "Syncronizes nyx Semver with Readthedocs"
dependsOn(project.tasks.named("nyxInfer"))
val nyxState: State = project.findProperty("nyxState") as State
module = "mike"
@@ -143,6 +141,8 @@ tasks.register("syncDocVersion", PythonTask::class) {
}
tasks.register("syncRequirements", PythonTask::class) {
+ group = "documentation"
+ description = "synchronizes Python setup tools dependency files with Gradle's"
dependsOn(tasks.named("nyxInfer"), tasks.named("generateRequirementsIn"))
module = "piptools"
command = "compile"
@@ -165,71 +165,9 @@ buildDashboard
*/
-// val releaseActive: Boolean? = rootProject.findProperty("release") as Boolean?
-
-// config {
-// // release = if (releaseActive != null) releaseActive!! else false
-// info {
-// name = "DDO Calculations"
-// vendor = "TruthEncode"
-// description = "DDO Character Analyzer and Planner"
-// inceptionYear = "2015"
-// version = VersionInfo().version
-
-// links {
-// website = gitHubBaseSite
-// issueTracker = siteIssueTracker
-// scm = siteScm
-// }
-
-// scm {
-// url = gitHubBaseSite
-// developerConnection = "scm:git:git@github.com:$gitHubAccountName/${gitExtension}"
-// connection = "scm:git:git://github.com/github.com/$gitHubAccountName/$gitExtension"
-// }
-
-// organization {
-// name = "TruthEncode"
-// url = "https://github.com/truthencode"
-// }
-
-// people {
-// person {
-// id = "adarro"
-// name = "Andre White"
-// roles = listOf("developer", "owner")
-// }
-// }
-
-// artifacts {
-// minpom {
-// enabled = true
-// }
-// jar {
-// enabled = false
-// }
-// }
-// }
-
-// licensing {
-// excludes = setOf(
-// "**/*.md",
-// "**/*.sql",
-// "**/avro/**/*.scala",
-// "buildSrc\\build\\kotlin-dsl\\plugins-blocks\\extracted\\*.kts",
-// "**/*.conf",
-// )
-// includes = setOf("src/main/java/**/*.java", "src/main/scala/*.scala", "src/main/kotlin/**/*.kt")
-// licenses {
-// license {
-// id = "Apache-2.0" // org.kordamp.gradle.plugin.base.model.LicenseId.APACHE_2_0
-// url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
-// }
-// }
-// }
-// }
-
tasks.register("showMyVersion") {
+ group = "utility"
+ description = "displays project version"
val v = project.version
logger.info("project version: $v")
logger.info(project.gradle.gradleVersion)
@@ -328,6 +266,8 @@ allprojects {
}
tasks.register("printConfigurations") {
+ group = "utility"
+ description = "prints existing configurations for a given project. See alt resolvableConfigurations"
doLast {
println("Project Name: $project.name configurations:")
configurations.forEach {
@@ -335,32 +275,12 @@ allprojects {
}
}
}
-// val syncVersionFiles by tasks.registering(Copy::class) {
-// if (rootProject != project) {
-// logger.warn("We are updating properties file in ${project.name}")
-// from(foo)
-// into(layout.projectDirectory)
-// } else {
-// logger.warn("in root project, nothing doing")
-// }
-// }
-// tasks.withType {
-// mustRunAfter(syncVersionFiles)
-// }
-// tasks.withType {
-// mustRunAfter(syncVersionFiles)
-// }
-// tasks.withType {
-// mustRunAfter(syncVersionFiles)
-// }
}
sonar {
-
properties {
property("sonar.projectKey", "truthencode_ddo-calc")
property("sonar.organization", "truthencode")
property("sonar.host.url", "https://sonarcloud.io")
-// property()
}
}
\ No newline at end of file
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 11415e33..fe5e87f3 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -57,6 +57,7 @@ chimney-s213 = "io.scalaland:chimney_2.13:0.8.0-M1"
enumeratum-s213 = "com.beachape:enumeratum_2.13:1.7.3"
flexmark-all = { module = "com.vladsch.flexmark:flexmark-all", version.ref = "flexmark" }
jade4j = { module = "de.neuland-bfi:jade4j", version.ref = "jade4j" }
+jetbrains-annotations = "org.jetbrains:annotations:17.0.0"
json4s-native-s213 = "org.json4s:json4s-native_2.13:4.1.0-M3"
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit-engine" }
@@ -104,14 +105,14 @@ wix-accord-scalatest-s213 = { module = "com.wix:accord-scalatest_2.13", version.
[bundles]
concordion = [
- "concordion",
- "concordion-collapse-output-extension",
- "concordion-embed-extension",
+ "concordion",
+ "concordion-collapse-output-extension",
+ "concordion-embed-extension",
]
kotest = [
- "kotest-assertions-core-jvm",
- "kotest-property-jvm",
- "kotest-runner-junit-jvm",
+ "kotest-assertions-core-jvm",
+ "kotest-property-jvm",
+ "kotest-runner-junit-jvm",
]
#scala-logging = ["typesafe-scala-logging-s213", "typesafe-config"]
scala-wix = ["wix-accord-core-s213", "wix-accord-scalatest-s213"]
diff --git a/settings.gradle.kts b/settings.gradle.kts
index d7767268..914cbcda 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -49,7 +49,6 @@ pluginManagement {
id("ru.vyarus.mkdocs") version "3.0.0"
id("io.quarkus") version "3.3.3"
id("org.sonarqube") version "4.3.1.3277"
-
}
repositories {
diff --git a/subprojects/common/ddo-antlr/build.gradle.kts b/subprojects/common/ddo-antlr/build.gradle.kts
index 58209cff..3035b676 100644
--- a/subprojects/common/ddo-antlr/build.gradle.kts
+++ b/subprojects/common/ddo-antlr/build.gradle.kts
@@ -21,7 +21,7 @@ description = "Antlr Parsing utilities"
val antlrJavaPath =
PackagePath(
project.layout.buildDirectory.dir("generated-src/java").get().asFile.path,
- "io.truthencode.ddo.grammar.antlr"
+ "io.truthencode.ddo.grammar.antlr",
)
data class PackagePath(val source: String, val packageName: String) {
diff --git a/subprojects/common/ddo-antlr/src/test/kotlin/io/truthencode/ddo/grammar/antlr/BasicTestKotlin.kt b/subprojects/common/ddo-antlr/src/test/kotlin/io/truthencode/ddo/grammar/antlr/BasicTestKotlin.kt
index 0cea4d66..82d9c674 100644
--- a/subprojects/common/ddo-antlr/src/test/kotlin/io/truthencode/ddo/grammar/antlr/BasicTestKotlin.kt
+++ b/subprojects/common/ddo-antlr/src/test/kotlin/io/truthencode/ddo/grammar/antlr/BasicTestKotlin.kt
@@ -1,6 +1,5 @@
package io.truthencode.ddo.grammar.antlr
-
import io.truthencode.ddo.visibla.javaclass.PojoDefaultJava
import io.truthencode.ddo.visibla.kotlinClass.PojoDefaultKotlin
diff --git a/subprojects/common/ddo-core/build.gradle.kts b/subprojects/common/ddo-core/build.gradle.kts
index ad0d6df4..50e83f95 100644
--- a/subprojects/common/ddo-core/build.gradle.kts
+++ b/subprojects/common/ddo-core/build.gradle.kts
@@ -43,8 +43,8 @@ dependencies {
implementation(libs.logback.classic)
implementation(libs.typesafe.scala.logging.s213)
+ implementation(libs.jetbrains.annotations)
testImplementation(project(":ddo-testing-util"))
- implementation(group = "org.jetbrains", name = "annotations", version = "17.0.0")
}
testing {
diff --git a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/Binding.scala b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/Binding.scala
index 5940f455..b085e2cd 100644
--- a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/Binding.scala
+++ b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/Binding.scala
@@ -34,7 +34,7 @@ sealed trait BindingStatus extends EnumEntry with DefaultValue[BindingStatus] {
object BindingStatus extends Enum[BindingStatus] with DefaultValue[BindingStatus] {
override lazy val default = Some(BindingStatus.Unbound)
- val values = findValues // IndexedSeq(BindsToAccount, BindsToCharacter, Unbound)
+ val values = findValues
/**
* Item can be transferred between characters on the same account.
diff --git a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/alignment/AlignmentType.scala b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/alignment/AlignmentType.scala
index 7313b9cd..c6e941a8 100644
--- a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/alignment/AlignmentType.scala
+++ b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/alignment/AlignmentType.scala
@@ -23,15 +23,12 @@ import io.truthencode.ddo.enumeration.BitSupport
import io.truthencode.ddo.support.SearchPrefix
import scala.collection.immutable
-// import io.truthencode.ddo.enumeration._
/**
* Created by adarr on 8/12/2016.
*/
sealed trait AlignmentType
-// extends BitWise
-
sealed trait LawAxis extends EnumEntry with AlignmentType with NoDefault[LawAxis] {
lazy val bitValue: Int = {
diff --git a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/character/Character.scala b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/character/Character.scala
index 58aefba5..fda37c06 100644
--- a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/character/Character.scala
+++ b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/character/Character.scala
@@ -97,7 +97,7 @@ trait Character {
* @return
* the list of skills.
* @note
- * Skills are dependent on Attributes and should be evaluted after.
+ * Skills are dependent on Attributes and should be evaluated after.
*/
def skills: List[SimpleStatItem[Skill]]
@@ -188,8 +188,6 @@ trait Character {
def offhandDoublestrike: StatItem[OffhandDoublestrike, Pct]
- // def meleeThreatMultiplier: StatItem[MeleeThreatMultiplier,Pct]
-
def strikeThroughChance: StatItem[StrikeThroughChance, Pct]
// Ranged Attack
@@ -198,7 +196,7 @@ trait Character {
def thrownAttackSpeedBonus: StatItem[ThrownAttackSpeedBonus, Pct]
def nonRepeatingCrossbowAttackSpeedBonus: StatItem[NonRepeatingCrossbowAttackSpeedBonus, Pct]
- // def rangedThreatMultiplier: StatItem[RangedThreatMultiplier,Pct]
+
// Effective hit points?
// Power
diff --git a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/classes/EpicCharacterClass.scala b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/classes/EpicCharacterClass.scala
index 3ff9b07a..95ecd75e 100644
--- a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/classes/EpicCharacterClass.scala
+++ b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/classes/EpicCharacterClass.scala
@@ -22,16 +22,23 @@ import io.truthencode.ddo.model.misc.{Availability, FreeToPlayFeature}
import scala.collection.immutable
+/**
+ * And epic character has achieved level 20 and can now enter Epic Quests. This also unlocks
+ * Destinies.
+ */
sealed trait EpicCharacterClass extends CharacterClass with EnumEntry {
self: Availability =>
}
+/**
+ * Represents character's between 20 and 29?
+ */
object EpicCharacterClass extends Enum[EpicCharacterClass] {
private val generateLevels = {
(21 to 30).map { x =>
{
val y = x - 20
- epicLevel(y)
+ EpicLevel(y)
}
}
}
@@ -39,6 +46,10 @@ object EpicCharacterClass extends Enum[EpicCharacterClass] {
override def values: immutable.IndexedSeq[EpicCharacterClass] = generateLevels
}
-case class epicLevel(level: Int) extends EpicCharacterClass with FreeToPlayFeature {
+/**
+* Represents an Epic level.
+ * @param level
+ */
+case class EpicLevel(level: Int) extends EpicCharacterClass with FreeToPlayFeature {
override def entryName: String = s"Level$level"
}
diff --git a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/classes/LengendaryCharacterClass.scala b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/classes/LengendaryCharacterClass.scala
new file mode 100644
index 00000000..82dd1d4a
--- /dev/null
+++ b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/classes/LengendaryCharacterClass.scala
@@ -0,0 +1,56 @@
+/*
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Copyright 2015-2021 Andre White.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.truthencode.ddo.model.classes
+
+import enumeratum.{Enum, EnumEntry}
+import io.truthencode.ddo.model.misc.{Availability, FreeToPlayFeature}
+
+import scala.collection.immutable
+
+/**
+ * And Legendary character has achieved level 30 and can now enter Legendary Quests. This also
+ * unlocks Destinies.
+ */
+sealed trait LegendaryCharacterClass extends CharacterClass with EnumEntry {
+ self: Availability =>
+}
+
+/**
+ * Represents character's 30 to current level cap (32)
+ */
+object LegendaryCharacterClass extends Enum[LegendaryCharacterClass] {
+ private val generateLevels = {
+ (31 to 33).map { x =>
+ {
+ val y = x - 30
+ LegendaryLevel(y)
+ }
+ }
+ }
+
+ override def values: immutable.IndexedSeq[LegendaryCharacterClass] = generateLevels
+}
+
+/**
+ * Represents an Legendary level.
+ * @param level
+ * Legendary Level (30+)
+ */
+case class LegendaryLevel(level: Int) extends LegendaryCharacterClass with FreeToPlayFeature {
+ override def entryName: String = s"Level$level"
+}
diff --git a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/monster/MonsterRace.scala b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/monster/MonsterRace.scala
index e928a19b..aea6b382 100644
--- a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/monster/MonsterRace.scala
+++ b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/monster/MonsterRace.scala
@@ -23,7 +23,9 @@ import io.truthencode.ddo.model.compendium.types._
import scala.collection.immutable
/**
- * Created by adarr on 3/25/2017.
+ * Represents a Monster Race and should essentially match the corresponding Monster Manual entry.
+ * This may at some point be used to add default resists / vulnerabilities to calculations. Examples
+ * include racial bane weapons, favored enemies etc. Created by adarr on 3/25/2017.
*/
sealed trait MonsterRace extends EnumEntry with MainTypeImpl {
@@ -147,21 +149,16 @@ object MonsterRace extends Enum[MonsterRace] {
case object Warforged extends MonsterRace with LivingConstruct
-// case object Bat extends MonsterRace
case object FiendishScorpion extends MonsterRace with MagicalBeasts
case object FiendishSpider extends MonsterRace with MagicalBeasts
- // case object Hyena extends MonsterRace
-// case object Lion extends MonsterRace
- case object Panther extends MonsterRace
+ case object Panther extends Animals
- case object PurpleWorm extends MonsterRace
+ case object PurpleWorm extends MagicalBeasts
- case object RazorCat extends MonsterRace
+ case object RazorCat extends Animals
-// case object Spider extends MonsterRace
-// case object Wolf extends MonsterRace
case object Worgs extends MonsterRace
case object WinterWolves extends MonsterRace
@@ -214,10 +211,6 @@ object MonsterRace extends Enum[MonsterRace] {
case object Troglodyte extends MonsterRace
-// case object Beholder extends MonsterRace
-// case object BlueDragon extends MonsterRace
-// case object FireElemental extends MonsterRace
-// case object Human extends MonsterRace
case object Ghast extends MonsterRace
case object Ghoul extends MonsterRace
@@ -228,7 +221,6 @@ object MonsterRace extends Enum[MonsterRace] {
case object Quell extends MonsterRace
-// case object Rat extends MonsterRace
case object Shadow extends MonsterRace
case object Skeleton extends MonsterRace
diff --git a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/types/Aberrations.scala b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/types/Aberrations.scala
index 0e8610b5..05d679e8 100644
--- a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/types/Aberrations.scala
+++ b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/types/Aberrations.scala
@@ -18,8 +18,8 @@
package io.truthencode.ddo.model.compendium.types
/**
- * Created by adarr on 3/25/2017.
+ * Corresponds to the 'Type' attribute. Created by adarr on 3/25/2017.
*/
trait Aberrations extends MainType {
- override val mainTypes = Some(MonsterType.Aberration)
+ override val mainTypes: Option[MonsterType] = Some(MonsterType.Aberration)
}
diff --git a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/types/MagicalBeasts.scala b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/types/MagicalBeasts.scala
index c4e37d3a..82664540 100644
--- a/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/types/MagicalBeasts.scala
+++ b/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/types/MagicalBeasts.scala
@@ -21,5 +21,5 @@ package io.truthencode.ddo.model.compendium.types
* Created by adarr on 3/25/2017.
*/
trait MagicalBeasts extends MainType {
- override val mainTypes = Some(MonsterType.MagicalBeast)
+ override val mainTypes: Option[MonsterType] = Some(MonsterType.MagicalBeast)
}
diff --git a/subprojects/common/ddo-test-results/build.gradle.kts b/subprojects/common/ddo-test-results/build.gradle.kts
index 7508e76f..11bf9de6 100644
--- a/subprojects/common/ddo-test-results/build.gradle.kts
+++ b/subprojects/common/ddo-test-results/build.gradle.kts
@@ -30,13 +30,19 @@ reporting {
// }
}
}
+sonar {
+
+ isSkipProject = true
+}
/**
Task simply prints out a list of projects to be used in the testReportAggregation
-this list isn't immideately available in the configuration phase, so we have to cut and paste
+this list isn't immediately available in the configuration phase, so we have to cut and paste
from a manually run listProjects task
*/
tasks.register("listProjects") {
+ description = "print out report aggregation projects"
+ group = "utility"
doLast {
val pl = projectList()
pl.sort()
@@ -89,6 +95,7 @@ Should be called with mdDocsBuild task
*/
tasks.register("moduleDependencyReport") {
description = "Creates a .dot file with all inter-module dependencies"
+ group = "documentation"
doLast {
val file = rootProject.layout.projectDirectory.file("docs/developers_guide/project-dependencies.dot").asFile
file.delete()
@@ -97,7 +104,7 @@ tasks.register("moduleDependencyReport") {
sb.append("strict digraph {\n")
sb.append("splines=ortho\n")
w.write(sb.toString())
- printDeps(w, rootProject)
+ printDependencies(w, rootProject)
w.write("}\n")
}
}
@@ -114,7 +121,7 @@ tasks.register("moduleDependencyReport") {
// }
// recursively print dependencies to file and move on to child projects
-fun printDeps(
+fun printDependencies(
writer: Writer,
project: Project,
) {
@@ -137,6 +144,6 @@ fun printDeps(
}
project.childProjects.forEach { (_, childProject) ->
logger.error("recursive call for $childProject")
- printDeps(writer, childProject)
+ printDependencies(writer, childProject)
}
}
\ No newline at end of file
diff --git a/subprojects/common/ddo-util/build.gradle.kts b/subprojects/common/ddo-util/build.gradle.kts
index c1691ed7..43cfca68 100644
--- a/subprojects/common/ddo-util/build.gradle.kts
+++ b/subprojects/common/ddo-util/build.gradle.kts
@@ -37,4 +37,4 @@ dependencies {
implementation(libs.logback.classic)
implementation(libs.typesafe.scala.logging.s213)
}
-}
+}
\ No newline at end of file