plugins { id 'org.springframework.boot' version '2.6.3' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' } group = 'ru.ulstu.is' version = '0.0.1-SNAPSHOT' sourceCompatibility = '17' def profile = project.hasProperty('prod') ? 'prod' : 'dev' println 'Current profile is ' + profile bootRun { systemProperties = System.properties systemProperty 'spring.profiles.active', profile } test { systemProperty 'spring.profiles.active', profile } jar { enabled = false } repositories { mavenCentral() } dependencies { if (profile == 'prod') { implementation 'org.postgresql:postgresql:42.3.5' } else { implementation 'com.h2database:h2:2.1.210' } implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-devtools' implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect' implementation 'org.webjars:bootstrap:5.1.3' implementation 'org.webjars:jquery:3.6.0' implementation 'org.webjars:font-awesome:6.1.0' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.liquibase:liquibase-core:4.10.0' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5' implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.springdoc:springdoc-openapi-ui:1.6.5' testImplementation 'org.springframework.boot:spring-boot-starter-test' } tasks.named('test') { useJUnitPlatform() }