27 lines
1.0 KiB
Groovy
27 lines
1.0 KiB
Groovy
//file:noinspection GrUnresolvedAccess
|
|
apply plugin: 'org.springframework.boot'
|
|
|
|
dependencies {
|
|
implementation(project(':mirror-core'))
|
|
|
|
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor:${springBootVerson}")
|
|
implementation("org.springframework.boot:spring-boot-starter-web:${springBootVerson}")
|
|
implementation("org.springframework.boot:spring-boot-starter-freemarker:${springBootVerson}")
|
|
}
|
|
|
|
tasks.named('compileJava') {
|
|
it.dependsOn('moveSpringConfigurationMetadata')
|
|
}
|
|
|
|
tasks.register('moveSpringConfigurationMetadata').configure {
|
|
it.dependsOn('processResources')
|
|
doLast {
|
|
def metafile = file("${sourceSets.main.output.resourcesDir}/META-INF/additional-spring-configuration-metadata.json")
|
|
if (metafile.exists()) {
|
|
def metafileTo = file("${sourceSets.main.output.classesDirs.asPath}/META-INF/spring-configuration-metadata.json")
|
|
metafileTo.parentFile.mkdirs()
|
|
metafile.renameTo(metafileTo)
|
|
}
|
|
}
|
|
}
|