)
This commit is contained in:
Binary file not shown.
@@ -2,7 +2,7 @@ plugins {
|
|||||||
id 'java'
|
id 'java'
|
||||||
id 'org.springframework.boot' version '3.5.5'
|
id 'org.springframework.boot' version '3.5.5'
|
||||||
id 'io.spring.dependency-management' version '1.1.7'
|
id 'io.spring.dependency-management' version '1.1.7'
|
||||||
id 'com.github.node-gradle.node' version '7.0.2' // ⬅️ РАСКОММЕНТИРУЙ
|
id 'com.github.node-gradle.node' version '7.0.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'com.example'
|
group = 'com.example'
|
||||||
@@ -34,7 +34,6 @@ dependencies {
|
|||||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||||
}
|
}
|
||||||
|
|
||||||
// ⭐ НАСТРОЙКИ ДЛЯ NODE/REACT
|
|
||||||
node {
|
node {
|
||||||
version = '20.18.0'
|
version = '20.18.0'
|
||||||
npmVersion = '10.8.2'
|
npmVersion = '10.8.2'
|
||||||
@@ -43,10 +42,8 @@ node {
|
|||||||
npmWorkDir = file("${project.projectDir}/front")
|
npmWorkDir = file("${project.projectDir}/front")
|
||||||
}
|
}
|
||||||
|
|
||||||
// ⭐ ЗАДАЧИ ДЛЯ REACT СБОРКИ ТОЛЬКО ДЛЯ FRONT ПРОФИЛЯ
|
|
||||||
task buildReact(type: NpmTask) {
|
task buildReact(type: NpmTask) {
|
||||||
onlyIf {
|
onlyIf {
|
||||||
// Собираем React только для front профиля или если явно указано
|
|
||||||
project.hasProperty('buildFront') ||
|
project.hasProperty('buildFront') ||
|
||||||
System.getProperty("spring.profiles.active") == "front"
|
System.getProperty("spring.profiles.active") == "front"
|
||||||
}
|
}
|
||||||
@@ -67,13 +64,11 @@ task copyReactBuild(type: Copy) {
|
|||||||
from "${project.projectDir}/front/dist"
|
from "${project.projectDir}/front/dist"
|
||||||
into "${project.buildDir}/resources/main/static"
|
into "${project.buildDir}/resources/main/static"
|
||||||
|
|
||||||
// Очищаем папку перед копированием
|
|
||||||
doFirst {
|
doFirst {
|
||||||
delete "${project.buildDir}/resources/main/static"
|
delete "${project.buildDir}/resources/main/static"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ⭐ ОБНОВЛЕННАЯ PROCESS RESOURCES
|
|
||||||
processResources {
|
processResources {
|
||||||
dependsOn copyReactBuild
|
dependsOn copyReactBuild
|
||||||
}
|
}
|
||||||
@@ -82,7 +77,6 @@ tasks.named('test') {
|
|||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ⭐ LIQUIBASE ЗАДАЧИ ДЛЯ УПРАВЛЕНИЯ МИГРАЦИЯМИ
|
|
||||||
task liquibaseStatus(type: JavaExec) {
|
task liquibaseStatus(type: JavaExec) {
|
||||||
group = "liquibase"
|
group = "liquibase"
|
||||||
description = "Показать статус миграций"
|
description = "Показать статус миграций"
|
||||||
|
|||||||
Reference in New Issue
Block a user