Files
hemhub/build.gradle
Urban Modig 84d7647481
All checks were successful
continuous-integration/drone/push Build is passing
Add household and membership domain with role-based APIs
Introduced `Household` and `HouseholdMember` entities, services, and repositories, enabling role-based access (`OWNER` and `MEMBER`). Added REST APIs for household creation, member management, and listing. Configured Flyway migrations, updated tests, and included IntelliJ HTTP client script for API testing. Updated `README.md` with feature details, usage instructions, and architecture overview.
2025-10-06 21:46:30 +02:00

74 lines
2.2 KiB
Groovy

plugins {
id 'java'
id 'org.springframework.boot' version '3.3.4'
id 'io.spring.dependency-management' version '1.1.6'
id 'jacoco'
}
group = 'se.urmo'
version = '0.0.1-SNAPSHOT'
java { toolchain { languageVersion = JavaLanguageVersion.of(21) } }
repositories { mavenCentral() }
ext['flyway.version'] = '10.17.3' // managed override
dependencies {
// --- Spring starters ---
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0'
// Core Flyway + Postgres driver plugin
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-database-postgresql'
// DB driver
runtimeOnly 'org.postgresql:postgresql:42.7.4'
// --- Lombok (used in services/guards) ---
compileOnly 'org.projectlombok:lombok:1.18.32'
annotationProcessor 'org.projectlombok:lombok:1.18.32'
testCompileOnly 'org.projectlombok:lombok:1.18.32'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.32'
// --- Tests ---
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'com.jayway.jsonpath:json-path:2.9.0'
testRuntimeOnly 'com.h2database:h2:2.2.224' // for application-test.yml profile
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
html.required = true
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.65 // börja rimligt (65%), höj senare
}
}
}
}
check.dependsOn jacocoTestCoverageVerification
tasks.test { useJUnitPlatform() }