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