forked from StarOpenSource/Engine
Use copy task instead of symlinks for resources
This commit is contained in:
parent
9c1f5711a7
commit
c6b3af023f
3 changed files with 35 additions and 17 deletions
|
@ -17,6 +17,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import java.nio.file.Files
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Plugins
|
// Plugins
|
||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
|
@ -54,6 +58,36 @@ dependencies {
|
||||||
testImplementation("org.jooq:joor:${dependencyJoor}")
|
testImplementation("org.jooq:joor:${dependencyJoor}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fix delombok task
|
||||||
|
delombok.doFirst {
|
||||||
|
File target = file("${project.projectDir}/src/main/module-info.java")
|
||||||
|
File source = file("${project.projectDir}/src/main/java/module-info.java")
|
||||||
|
|
||||||
|
target.delete()
|
||||||
|
source.renameTo(target)
|
||||||
|
}
|
||||||
|
delombok.doLast {
|
||||||
|
File target = file("${project.projectDir}/src/main/java/module-info.java")
|
||||||
|
File source = file("${project.projectDir}/src/main/module-info.java")
|
||||||
|
|
||||||
|
target.delete()
|
||||||
|
source.renameTo(target)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy gradle.properties file
|
||||||
|
// for inclusion in final build
|
||||||
|
tasks.register("copyGradleProperties") {
|
||||||
|
doFirst {
|
||||||
|
File target = file("${project.projectDir}/src/main/resources/gradle.properties")
|
||||||
|
File source = file(project(":").projectDir.getPath() + "/gradle.properties")
|
||||||
|
target.delete()
|
||||||
|
Files.copy(source.toPath(), target.toPath())
|
||||||
|
}
|
||||||
|
|
||||||
|
outputs.upToDateWhen({ false }) // Force task execution
|
||||||
|
}
|
||||||
|
processResources.dependsOn(copyGradleProperties)
|
||||||
|
|
||||||
// Git properties configuration
|
// Git properties configuration
|
||||||
// Allows us to embed git commit information in the engine build
|
// Allows us to embed git commit information in the engine build
|
||||||
gitProperties {
|
gitProperties {
|
||||||
|
@ -79,22 +113,6 @@ tasks.register("writeGitProperties") { // This task's only purpose is to copy t
|
||||||
generateGitProperties.outputs.upToDateWhen({ false }) // Force task execution
|
generateGitProperties.outputs.upToDateWhen({ false }) // Force task execution
|
||||||
processResources.dependsOn(writeGitProperties) // Ensure git.properties file is present
|
processResources.dependsOn(writeGitProperties) // Ensure git.properties file is present
|
||||||
|
|
||||||
// Fix delombok task
|
|
||||||
delombok.doFirst {
|
|
||||||
File target = file("${project.projectDir}/src/main/module-info.java")
|
|
||||||
File source = file("${project.projectDir}/src/main/java/module-info.java")
|
|
||||||
|
|
||||||
target.delete()
|
|
||||||
source.renameTo(target)
|
|
||||||
}
|
|
||||||
delombok.doLast {
|
|
||||||
File target = file("${project.projectDir}/src/main/java/module-info.java")
|
|
||||||
File source = file("${project.projectDir}/src/main/module-info.java")
|
|
||||||
|
|
||||||
target.delete()
|
|
||||||
source.renameTo(target)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Javadoc configuration
|
// Javadoc configuration
|
||||||
javadoc {
|
javadoc {
|
||||||
outputs.upToDateWhen { false } // Force task execution
|
outputs.upToDateWhen { false } // Force task execution
|
||||||
|
|
1
base/src/main/resources/.gitignore
vendored
Normal file
1
base/src/main/resources/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
*.properties
|
|
@ -1 +0,0 @@
|
||||||
../../../../gradle.properties
|
|
Loading…
Reference in a new issue