mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-27 17:00:14 +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 {
|
project.afterEvaluate {
|
||||||
val validatorProject = findProject(project.path + ":validator-${dir.name}")
|
val validatorProject = findProject(getValidatorDir(dir))
|
||||||
validatorProject
|
validatorProject?.afterEvaluate {
|
||||||
?.getTasksByName("apiDump", false)
|
tasks.getByName("apiDump").let { apiDumpAll.dependsOn(it) }
|
||||||
?.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.
|
* @param targetName `null` for JVM projects.
|
||||||
*/
|
*/
|
||||||
@ -59,9 +62,9 @@ object BinaryCompatibilityConfigurator {
|
|||||||
)
|
)
|
||||||
|
|
||||||
project.afterEvaluate {
|
project.afterEvaluate {
|
||||||
findProject(project.path + ":validator-${dir.name}")
|
findProject(getValidatorDir(dir))
|
||||||
?.afterEvaluate {
|
?.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
|
if (!validationDir.exists()) continue
|
||||||
validationDir.listFiles().orEmpty<File>().forEach { dir ->
|
validationDir.listFiles().orEmpty<File>().forEach { dir ->
|
||||||
if (dir.resolve("build.gradle.kts").isFile) {
|
if (dir.resolve("build.gradle.kts").isFile) {
|
||||||
val path = project.path + ":validator-${dir.name}"
|
val path = ":validator" + project.path + ":${dir.name}"
|
||||||
include(path)
|
include(path)
|
||||||
project(path).projectDir = dir
|
project(path).projectDir = dir
|
||||||
// project(path).name = "${project.name}-validator-${dir.name}"
|
// project(path).name = "${project.name}-validator-${dir.name}"
|
||||||
|
Loading…
Reference in New Issue
Block a user