Replace 'project' with 'this@allprojects'

This commit is contained in:
JeremyStar™ 2024-12-25 01:57:42 +01:00
parent c671c23df0
commit a2db3c3278
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -215,7 +215,7 @@ allprojects {
dokkaSourceSets.configureEach {
// Metadata
displayName = project.name
displayName = this@allprojects.name
documentedVisibilities = setOf(DokkaConfiguration.Visibility.PUBLIC, DokkaConfiguration.Visibility.PROTECTED)
reportUndocumented = false
skipEmptyPackages = false
@ -224,8 +224,8 @@ allprojects {
// Source link
sourceLink {
localDirectory = projectDir.resolve("src")
remoteUrl = URI("https://git.staropensource.de/StarOpenSource/Engine/src/branch/develop/" + project.name.replace(":", "/") + "/src").toURL()
localDirectory = this@allprojects.projectDir.resolve("src")
remoteUrl = URI("https://git.staropensource.de/StarOpenSource/Engine/src/branch/develop/" + this@allprojects.name.replace(":", "/") + "/src").toURL()
remoteLineSuffix = "#L"
}
}
@ -241,18 +241,18 @@ allprojects {
dateFormatTimeZone = "UTC"
}
// -> Copy task
// -> Add input
tasks.register("copyGitProperties") {
dependsOn(tasks.generateGitProperties)
inputs.file("${project.projectDir}/build/resources/main/git.properties")
inputs.file("${this@allprojects.projectDir}/build/resources/main/git.properties")
doLast {
if (rootProject == project)
if (rootProject == this@allprojects)
return@doLast
file(inputs.files.first())
.copyTo(
file("${project.projectDir}/src/main/resources/sosengine-${project.name.replace(":", "-")}-git.properties"),
file("${this@allprojects.projectDir}/src/main/resources/sosengine-${this@allprojects.name.replace(":", "-")}-git.properties"),
overwrite = true
)
}
@ -263,7 +263,7 @@ allprojects {
// Gradle properties
tasks.register("copyGradleProperties") {
inputs.file("${project(":").projectDir.path}/gradle.properties")
inputs.file("${rootProject.projectDir.path}/gradle.properties")
doLast {
if (rootProject == project)
@ -271,7 +271,7 @@ allprojects {
file(inputs.files.first())
.copyTo(
file("${project.projectDir}/src/main/resources/sosengine-${project.name.replace(":", "-")}-gradle.properties"),
file("${this@allprojects.projectDir}/src/main/resources/sosengine-${this@allprojects.name.replace(":", "-")}-gradle.properties"),
overwrite = true
)
}