diff --git a/build.gradle b/build.gradle index d0022b6..7649a55 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,5 @@ plugins { + id 'java' id 'org.springframework.boot' version '2.4.3' id 'io.spring.dependency-management' version '1.0.11.RELEASE' } @@ -7,41 +8,32 @@ plugins { group = 'io.reflectoring.buckpal' version = '0.0.1-SNAPSHOT' -apply plugin: 'java' -apply plugin: 'io.spring.dependency-management' -apply plugin: 'java-library' +configurations { + compileOnly { + extendsFrom annotationProcessor + } +} repositories { mavenCentral() } -compileJava { - sourceCompatibility = 11 - targetCompatibility = 11 -} +sourceCompatibility = 11 dependencies { compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' - implementation ('org.springframework.boot:spring-boot-starter-web') + implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - testImplementation('org.springframework.boot:spring-boot-starter-test') { - exclude group: 'junit' // excluding junit 4 - } - testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.0.1' - testImplementation 'org.mockito:mockito-junit-jupiter:2.23.0' + testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'com.tngtech.archunit:archunit:0.16.0' - testImplementation 'org.junit.platform:junit-platform-launcher:1.4.2' - testImplementation 'com.h2database:h2' runtimeOnly 'com.h2database:h2' - } -test { +tasks.named('test') { useJUnitPlatform() -} - +} \ No newline at end of file diff --git a/src/main/java/io/reflectoring/buckpal/account/domain/Account.java b/src/main/java/io/reflectoring/buckpal/account/domain/Account.java index 142c318..b2f02fe 100644 --- a/src/main/java/io/reflectoring/buckpal/account/domain/Account.java +++ b/src/main/java/io/reflectoring/buckpal/account/domain/Account.java @@ -20,7 +20,7 @@ public class Account { /** * The unique ID of the account. */ - @Getter private final AccountId id; + private final AccountId id; /** * The baseline balance of the account. This was the balance of the account before the first @@ -112,7 +112,7 @@ public boolean deposit(Money money, AccountId sourceAccountId) { @Value public static class AccountId { - private Long value; + Long value; } } diff --git a/src/test/java/io/reflectoring/buckpal/DependencyRuleTests.java b/src/test/java/io/reflectoring/buckpal/DependencyRuleTests.java index 75b240c..992d3a2 100644 --- a/src/test/java/io/reflectoring/buckpal/DependencyRuleTests.java +++ b/src/test/java/io/reflectoring/buckpal/DependencyRuleTests.java @@ -33,12 +33,12 @@ void validateRegistrationContextArchitecture() { void testPackageDependencies() { noClasses() .that() - .resideInAPackage("io.reflectoring.reviewapp.domain..") + .resideInAPackage("io.reflectoring.buckpal.account.domain..") .should() .dependOnClassesThat() - .resideInAnyPackage("io.reflectoring.reviewapp.application..") + .resideInAnyPackage("io.reflectoring.buckpal.account.application..") .check(new ClassFileImporter() - .importPackages("io.reflectoring.reviewapp..")); + .importPackages("io.reflectoring.buckpal..")); } }