Advertisement
mullerdaniil

querydsl + gradle + hibernate

Oct 16th, 2023
2,536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.64 KB | Source Code | 0 0
  1. plugins {
  2.     id 'java'
  3.     id "com.ewerk.gradle.plugins.querydsl" version "1.0.10"
  4. }
  5.  
  6. group = 'com.baxter.sinverguenza'
  7. version = '1.0-SNAPSHOT'
  8.  
  9. repositories {
  10.     mavenCentral()
  11. }
  12.  
  13. sourceSets {
  14.     main {
  15.         java {
  16.             srcDirs += "$buildDir/generated/sources/annotationProcessor/java/main"
  17.         }
  18.     }
  19. }
  20.  
  21. java {
  22.     sourceCompatibility = JavaVersion.VERSION_17
  23.     targetCompatibility = JavaVersion.VERSION_17
  24. }
  25.  
  26. configurations {
  27.     querydsl.extendsFrom implementation, runtimeOnly, compileOnly
  28. }
  29.  
  30. dependencies {
  31.     implementation 'org.hibernate:hibernate-core:6.1.5.Final'
  32.     implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
  33.     implementation 'org.slf4j:slf4j-log4j12:2.0.9'
  34.  
  35.     implementation "com.querydsl:querydsl-jpa:5.0.0:jakarta"
  36.     annotationProcessor "com.querydsl:querydsl-apt:5.0.0:jakarta"
  37.  
  38.     annotationProcessor "jakarta.persistence:jakarta.persistence-api:3.1.0"
  39.  
  40.     runtimeOnly 'org.postgresql:postgresql:42.6.0'
  41.  
  42.     compileOnly 'org.projectlombok:lombok:1.18.30'
  43.     annotationProcessor 'org.projectlombok:lombok:1.18.30'
  44.  
  45.     testCompileOnly 'org.projectlombok:lombok:1.18.30'
  46.     testAnnotationProcessor 'org.projectlombok:lombok:1.18.30'
  47.  
  48.     testImplementation platform('org.junit:junit-bom:5.9.1')
  49.     testImplementation 'org.junit.jupiter:junit-jupiter'
  50.  
  51.     testImplementation 'org.assertj:assertj-core:3.24.2'
  52. }
  53.  
  54. querydsl {
  55.     jpa = true
  56.     querydslSourcesDir = "$buildDir/generated/sources/annotationProcessor/java/main"
  57. }
  58.  
  59. compileQuerydsl {
  60.     options.annotationProcessorPath = configurations.querydsl
  61. }
  62.  
  63. test {
  64.     useJUnitPlatform()
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement