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

Build script simplified #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 11 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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'
}
Expand All @@ -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()
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -112,7 +112,7 @@ public boolean deposit(Money money, AccountId sourceAccountId) {

@Value
public static class AccountId {
private Long value;
Long value;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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.."));
}

}