mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-27 08:50:15 +08:00
Fix project structure for Dokka
Co-authored-by: 微莹·纤绫 <karlatemp@vip.qq.com>
This commit is contained in:
parent
25910dbe0c
commit
1ab48748ab
@ -32,17 +32,20 @@ object BinaryCompatibilityConfigurator {
|
||||
}
|
||||
|
||||
project.afterEvaluate {
|
||||
val validatorProject = findProject(project.path + ":validator-${dir.name}")
|
||||
validatorProject
|
||||
?.getTasksByName("apiDump", false)
|
||||
?.let { apiDumpAll.dependsOn(it) }
|
||||
val validatorProject = findProject(getValidatorDir(dir))
|
||||
validatorProject?.afterEvaluate {
|
||||
tasks.getByName("apiDump").let { apiDumpAll.dependsOn(it) }
|
||||
}
|
||||
|
||||
validatorProject?.afterEvaluate {
|
||||
tasks.getByName("apiCheck").let { apiCheckAll.dependsOn(it) }
|
||||
}
|
||||
|
||||
validatorProject
|
||||
?.getTasksByName("apiCheck", false)
|
||||
?.let { apiCheckAll.dependsOn(it) }
|
||||
}
|
||||
}
|
||||
|
||||
private fun Project.getValidatorDir(dir: File) = ":validator" + project.path + ":${dir.name}"
|
||||
|
||||
/**
|
||||
* @param targetName `null` for JVM projects.
|
||||
*/
|
||||
@ -59,9 +62,9 @@ object BinaryCompatibilityConfigurator {
|
||||
)
|
||||
|
||||
project.afterEvaluate {
|
||||
findProject(project.path + ":validator-${dir.name}")
|
||||
findProject(getValidatorDir(dir))
|
||||
?.afterEvaluate {
|
||||
tasks["apiBuild"].dependsOn(project.tasks["build"])
|
||||
tasks.findByName("apiBuild")?.dependsOn(project.tasks["build"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ for (project in allProjects) {
|
||||
if (!validationDir.exists()) continue
|
||||
validationDir.listFiles().orEmpty<File>().forEach { dir ->
|
||||
if (dir.resolve("build.gradle.kts").isFile) {
|
||||
val path = project.path + ":validator-${dir.name}"
|
||||
val path = ":validator" + project.path + ":${dir.name}"
|
||||
include(path)
|
||||
project(path).projectDir = dir
|
||||
// project(path).name = "${project.name}-validator-${dir.name}"
|
||||
|
Loading…
Reference in New Issue
Block a user