77 lines
2.3 KiB
Groovy
77 lines
2.3 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath 'org.jooq:jooq-codegen:3.16.11'
|
|
classpath 'org.flywaydb:flyway-core'
|
|
classpath "org.flywaydb:flyway-mysql:9.2.0"
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot' version '2.7.5'
|
|
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
|
|
id "org.flywaydb.flyway" version "8.5.13"
|
|
id 'nu.studer.jooq' version '7.1.1'
|
|
}
|
|
|
|
allprojects{
|
|
apply plugin: 'java'
|
|
apply plugin: 'org.springframework.boot'
|
|
apply plugin: 'io.spring.dependency-management'
|
|
apply plugin: 'nu.studer.jooq'
|
|
group = 'org.fycd'
|
|
version = '0.0.1'
|
|
|
|
sourceCompatibility = 11
|
|
targetCompatibility = 11
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
configurations {
|
|
compileOnly {
|
|
extendsFrom annotationProcessor
|
|
}
|
|
}
|
|
dependencies {
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc:2.7.5'
|
|
implementation 'org.springframework.boot:spring-boot-starter-jooq'
|
|
implementation 'org.springframework.boot:spring-boot-starter-web:2.7.5'
|
|
implementation 'org.springframework.boot:spring-boot-starter-security:2.7.5'
|
|
compileOnly 'org.projectlombok:lombok'
|
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
|
runtimeOnly 'com.h2database:h2'
|
|
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
|
|
annotationProcessor 'org.projectlombok:lombok'
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
jooqGenerator 'org.mariadb.jdbc:mariadb-java-client'
|
|
jooqGenerator 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0'
|
|
}
|
|
|
|
tasks.named('test') {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(':security-core')
|
|
}
|
|
|
|
|
|
task migrateDB(type: org.flywaydb.gradle.task.FlywayMigrateTask) {
|
|
driver = 'org.mariadb.jdbc.Driver'
|
|
url = 'jdbc:mariadb://localhost:3306/fycd?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Taipei'
|
|
user = 'root'
|
|
password = 'roottoor'
|
|
locations = ['filesystem:migrations']
|
|
target = 'latest'
|
|
baselineVersion = '0.0.1.1'
|
|
baselineOnMigrate = true
|
|
validateOnMigrate = true
|
|
outOfOrder = true
|
|
placeholderReplacement = false
|
|
}
|