Files
real-world-springboot/build.gradle

68 lines
2.1 KiB
Groovy

plugins {
id 'org.springframework.boot' version '2.7.3'
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
id 'java'
id "com.github.node-gradle.node" version "3.1.1"
}
apply plugin: 'com.github.node-gradle.node'
node {
workDir = file("./src/frontend")
npmWorkDir = file("./src/frontend")
nodeModulesDir = file("./src/frontend")
}
group = 'com.io'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '18'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.projectlombok:lombok:1.18.24'
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.5'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.5'
annotationProcessor 'org.projectlombok:lombok'
// https://mvnrepository.com/artifact/org.postgresql/postgresql
//implementation group: 'org.postgresql', name: 'postgresql', version: '42.5.0'
// https://mvnrepository.com/artifact/org.bgee.log4jdbc-log4j2/log4jdbc-log4j2-jdbc4
implementation group: 'org.bgee.log4jdbc-log4j2', name: 'log4jdbc-log4j2-jdbc4', version: '1.16'
// inmemory
runtimeOnly 'com.h2database:h2'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-starter-jdbc:2.7.3'
testImplementation 'org.springframework.security:spring-security-test'
}
tasks.named('test') {
useJUnitPlatform()
}
task setUp(type: NpmTask){
description = "Install pacakges"
args = ['install']
inputs.files file('./src/frontend/package.json')
outputs.files file('./src/frontend/node_modules')
}
task buildFrontEnd(type: NpmTask){
description = "Build Vue.js"
args = ['run', 'build']
}
processResources.dependsOn 'buildFrontEnd'