Skip to content
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
183 changes: 90 additions & 93 deletions RestroHub/build.gradle
Original file line number Diff line number Diff line change
@@ -1,93 +1,90 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.6' // Use 3.4.1 stable version , 3.2.x is the latest fully supported version by Springdoc, Security, JPA, Actuator, etc.
id 'io.spring.dependency-management' version '1.1.7'
id 'war'
}

group = 'com.restroly'
version = '0.0.1-SNAPSHOT'
description = 'Demo project for Spring Boot'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

// Define versions
ext {
lombokVersion = '1.18.34'
mapstructVersion = '1.6.3'
}

dependencies {
// Spring Boot Starters
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-websocket'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-tomcat'
developmentOnly 'org.springframework.boot:spring-boot-devtools'

// Database
runtimeOnly 'org.postgresql:postgresql:42.7.2'

// Lombok - ORDER MATTERS!
compileOnly "org.projectlombok:lombok:${lombokVersion}"

// Annotation Processors - ORDER MATTERS!
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok-mapstruct-binding:0.2.0" // ADD THIS
annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"

// MapStruct
implementation "org.mapstruct:mapstruct:${mapstructVersion}"

// QR Code Generation
implementation 'com.google.zxing:core:3.5.2'
implementation 'com.google.zxing:javase:3.5.2'

implementation 'com.cloudinary:cloudinary-http44:1.39.0'

// Testing
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
// testImplementation 'org.springframework.boot:spring-boot-starter-test';
testImplementation 'org.springframework.security:spring-security-test';

//OpenAPI Documentation
// https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-starter-webmvc-ui
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'

// JWT
implementation 'io.jsonwebtoken:jjwt-api:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.3'

// Logging (JSON format for production)
implementation 'ch.qos.logback.contrib:logback-json-classic:0.1.5'
implementation 'ch.qos.logback.contrib:logback-jackson:0.1.5'
}

tasks.named('test') {
enabled = false
}


//tasks.withType<Test> {
// useJUnitPlatform()
//}
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.6' // Use 3.4.1 stable version , 3.2.x is the latest fully supported version by Springdoc, Security, JPA, Actuator, etc.
id 'io.spring.dependency-management' version '1.1.7'
id 'war'
}

group = 'com.restroly'
version = '0.0.1-SNAPSHOT'
description = 'Demo project for Spring Boot'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

// Define versions
ext {
lombokVersion = '1.18.34'
mapstructVersion = '1.6.3'
}

dependencies {
// Spring Boot Starters
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-websocket'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-tomcat'
developmentOnly 'org.springframework.boot:spring-boot-devtools'

// Database
runtimeOnly 'org.postgresql:postgresql:42.7.2'

// Lombok - ORDER MATTERS!
compileOnly "org.projectlombok:lombok:${lombokVersion}"

// Annotation Processors - ORDER MATTERS!
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok-mapstruct-binding:0.2.0" // ADD THIS
annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"

// MapStruct
implementation "org.mapstruct:mapstruct:${mapstructVersion}"

// QR Code Generation
implementation 'com.google.zxing:core:3.5.2'
implementation 'com.google.zxing:javase:3.5.2'

implementation 'com.cloudinary:cloudinary-http44:1.39.0'

// Testing
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testRuntimeOnly 'com.h2database:h2' // In-memory DB for tests — no PostgreSQL needed

//OpenAPI Documentation
// https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-starter-webmvc-ui
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'

// JWT
implementation 'io.jsonwebtoken:jjwt-api:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.3'

// Logging (JSON format for production)
implementation 'ch.qos.logback.contrib:logback-json-classic:0.1.5'
implementation 'ch.qos.logback.contrib:logback-jackson:0.1.5'
}

tasks.named('test') {
useJUnitPlatform() // required for JUnit 5 (Jupiter)
systemProperty 'spring.profiles.active', 'test'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This file is intentionally empty.
// The correct test file is at:
// src/test/java/com/restroly/qrmenu/order/service/OrderServiceImplTest.java
//
// This file was placed in the wrong package — please delete it.
package com.restroly.qrmenu;

public class OrderServiceImplTest {
// Please delete this file — it is in the wrong package.
// The real test is at: com.restroly.qrmenu.order.service.OrderServiceImplTest
}
Comment thread
kushwahshivam marked this conversation as resolved.
Loading