plugins { id 'org.springframework.boot' version '2.6.7' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' } group = 'hello.world' version = '1.0.0' sourceCompatibility = '17' compileJava.options.encoding = 'UTF-8' compileTestJava.options.encoding = 'UTF-8' configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } processResources{ dependsOn 'copyFrontendToBuild' } bootJar{ archiveFileName = "app.jar" } task copyFrontendToBuild(type: Copy) { dependsOn 'npmBuild' from "$projectDir/frontend/dist/" into "$buildDir/resources/main/static" } task npmBuild(type: Exec) { workingDir './frontend/' commandLine 'npm','run', 'build' } dependencies { implementation 'org.springframework.boot:spring-boot-starter-test' implementation 'org.springframework.boot:spring-boot-starter' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' // https://mvnrepository.com/artifact/org.springframework.data/spring-data-rest-core implementation group: 'org.springframework.data', name: 'spring-data-rest-core', version: '3.7.0' // https://mvnrepository.com/artifact/org.springframework.data/spring-data-rest-webmvc implementation group: 'org.springframework.data', name: 'spring-data-rest-webmvc', version: '3.7.0' // https://mvnrepository.com/artifact/com.h2database/h2 implementation group: 'com.h2database', name: 'h2', version: '1.3.148' //lombok compileOnly 'org.projectlombok:lombok:1.18.24' annotationProcessor 'org.projectlombok:lombok:1.18.24' testCompileOnly 'org.projectlombok:lombok:1.18.24' testAnnotationProcessor 'org.projectlombok:lombok:1.18.24' testImplementation 'org.springframework.boot:spring-boot-starter-test' } sourceSets { main { java { srcDir 'backend/src/main/' } resources { srcDir 'backend/src/resources' } } test { java { srcDir 'backend/src/test/java' } resources { srcDir 'backend/src/test/resources' } } } processResources { duplicatesStrategy = DuplicatesStrategy.INCLUDE } test { defaultCharacterEncoding = 'UTF-8' useJUnitPlatform() }