Skip to content

Commit

Permalink
feat(core): Add one-to-one relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseLion committed Feb 18, 2024
1 parent 3d7f169 commit 6794a64
Show file tree
Hide file tree
Showing 28 changed files with 1,637 additions and 65 deletions.
28 changes: 27 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ buildscript {
plugins {
id('checkstyle')
id('java-library')
id('java-test-fixtures')

alias(libs.plugins.prettyJupiter)
alias(libs.plugins.sonarlint)
alias(libs.plugins.spring.boot)
alias(libs.plugins.spring.management)
alias(libs.plugins.strictNullCheck)
}

Expand Down Expand Up @@ -49,6 +52,10 @@ jar {
}
}

bootJar {
enabled = false
}

checkstyle {
setToolVersion(libs.versions.checkstyle.get())
setMaxWarnings(0)
Expand All @@ -72,7 +79,7 @@ sonarLint {
}

strictNullCheck {
addEclipse()
addEclipse(libs.versions.eclipse.get())
packageInfo {
useEclipse()
javadoc = '@author Jose Luis Leon'
Expand All @@ -97,7 +104,18 @@ repositories {
dependencies {
annotationProcessor(libs.lombok)
compileOnly(libs.lombok)
compileOnly(libs.spring.data.r2dbc)
compileOnly(libs.spring.webflux)
sonarlintCorePlugins(libs.sonarlint.java)

implementation(libs.maybe)

testFixturesAnnotationProcessor(libs.lombok)
testFixturesCompileOnly(libs.lombok)
testFixturesImplementation(libs.spring.boot.r2dbc)
testFixturesImplementation(libs.spring.boot.webflux)
testFixturesRuntimeOnly(libs.h2)
testFixturesRuntimeOnly(libs.h2.r2dbc)
}

testing {
Expand All @@ -108,8 +126,16 @@ testing {
dependencies {
annotationProcessor(libs.lombok)
compileOnly(libs.lombok)
runtimeOnly(libs.h2)
runtimeOnly(libs.h2.r2dbc)

implementation(libs.assertj.core)
implementation(libs.mockito.core)
implementation(libs.reactor.extra)
implementation(libs.reactor.test)
implementation(libs.spring.boot.r2dbc)
implementation(libs.spring.boot.test)
implementation(libs.spring.boot.webflux)
}
}
}
Expand Down
23 changes: 23 additions & 0 deletions buildscript-gradle.lockfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
# 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.google.code.findbugs:jsr305:3.0.2=classpath
io.github.joselion.pretty-jupiter:io.github.joselion.pretty-jupiter.gradle.plugin:3.2.0=classpath
io.github.joselion.strict-null-check:io.github.joselion.strict-null-check.gradle.plugin:3.3.0=classpath
io.github.joselion:maybe:3.5.0=classpath
io.github.joselion:pretty-jupiter:3.2.0=classpath
io.github.joselion:strict-null-check:3.3.0=classpath
io.spring.dependency-management:io.spring.dependency-management.gradle.plugin:1.1.4=classpath
io.spring.gradle:dependency-management-plugin:1.1.4=classpath
name.remal.gradle-plugins.sonarlint:sonarlint:3.4.6=classpath
name.remal.sonarlint:name.remal.sonarlint.gradle.plugin:3.4.6=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.3=classpath
org.apache.httpcomponents.core5:httpcore5-h2:5.2.4=classpath
org.apache.httpcomponents.core5:httpcore5:5.2.4=classpath
org.slf4j:slf4j-api:1.7.36=classpath
org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.2=classpath
org.springframework.boot:spring-boot-buildpack-platform:3.2.2=classpath
org.springframework.boot:spring-boot-gradle-plugin:3.2.2=classpath
org.springframework.boot:spring-boot-loader-tools:3.2.2=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=
4 changes: 4 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
<module name="UnusedLocalVariable" />

<!-- Filters -->
<module name="SuppressionXpathFilter">
<property name="file" value="${config_loc}/xpath-suppressions.xml" default="config/checkstyle/xpath-suppressions.xml" />
<property name="optional" value="false" />
</module>
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="NOSONAR|NOCHECKSTYLE" />
</module>
Expand Down
5 changes: 5 additions & 0 deletions config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@
<!-- Test Helpers -->
<suppress files=".*[\\/]?src[\\/]test[\\/].+\.java$" checks="MissingJavadocPackage" />
<suppress files=".*[\\/]?src[\\/]test[\\/].+\.java$" checks="MissingJavadocType" />

<!-- Test Fixtures -->
<suppress files=".*[\\/]?src[\\/]testFixtures[\\/].+\.java$" checks="MissingJavadocPackage" />
<suppress files=".*[\\/]?src[\\/]testFixtures[\\/].+\.java$" checks="MissingJavadocType" />
<suppress files=".*[\\/]?src[\\/]testFixtures[\\/].+\.java$" checks="MissingJavadocMethod" />
</suppressions>
24 changes: 24 additions & 0 deletions config/checkstyle/xpath-suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionXpathFilter Experimental Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2_xpath_experimental.dtd">

<suppressions>
<!-- Spring Boot -->
<suppress-xpath
checks="HideUtilityClassConstructor"
files="\.java$"
query="
//CLASS_DEF[
./MODIFIERS[
./ANNOTATION[
./IDENT[
@text='SpringBootApplication'
or @text='Configuration'
or @text='Component'
or @text='Service'
]
]
]
]
"
/>
</suppressions>
Loading

0 comments on commit 6794a64

Please sign in to comment.