This commit is contained in:
@@ -21,6 +21,24 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
installer {
|
||||
java.srcDirs = ['src/installer/java']
|
||||
resources.srcDirs = ['src/installer/resources']
|
||||
}
|
||||
installerTest {
|
||||
java.srcDirs = ['src/installerTest/java']
|
||||
resources.srcDirs = ['src/installerTest/resources']
|
||||
compileClasspath += sourceSets.installer.output
|
||||
runtimeClasspath += sourceSets.installer.output
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
installerTestImplementation.extendsFrom testImplementation, installerImplementation
|
||||
installerTestRuntimeOnly.extendsFrom testRuntimeOnly, installerRuntimeOnly
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
||||
@@ -48,12 +66,47 @@ dependencies {
|
||||
implementation 'org.jsoup:jsoup:1.22.2'
|
||||
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
|
||||
installerImplementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
installerImplementation 'org.springframework.boot:spring-boot-starter-validation'
|
||||
installerImplementation 'org.flywaydb:flyway-core:10.22.0'
|
||||
installerRuntimeOnly 'org.flywaydb:flyway-database-postgresql:10.22.0'
|
||||
installerRuntimeOnly 'org.postgresql:postgresql'
|
||||
}
|
||||
|
||||
tasks.named('test') {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
tasks.named('processInstallerResources') {
|
||||
from('src/main/resources') {
|
||||
include 'db/migration/postgresql/**'
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('installerTest', Test) {
|
||||
description = 'Runs tests for the standalone web installer.'
|
||||
group = 'verification'
|
||||
testClassesDirs = sourceSets.installerTest.output.classesDirs
|
||||
classpath = sourceSets.installerTest.runtimeClasspath
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
tasks.register('installerBootJar', org.springframework.boot.gradle.tasks.bundling.BootJar) {
|
||||
description = 'Builds the standalone first-run web installer.'
|
||||
group = 'build'
|
||||
archiveBaseName = 'kaidi-erp-installer'
|
||||
archiveVersion = project.version
|
||||
mainClass = 'com.kaidi.oa.install.InstallerApplication'
|
||||
targetJavaVersion = JavaVersion.VERSION_17
|
||||
classpath = sourceSets.installer.runtimeClasspath
|
||||
dependsOn tasks.named('installerClasses')
|
||||
}
|
||||
|
||||
tasks.named('check') {
|
||||
dependsOn tasks.named('installerTest')
|
||||
}
|
||||
|
||||
springBoot {
|
||||
buildInfo()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user