mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
Adding projects
This commit is contained in:
parent
ffa78ebfe1
commit
c8a5552c9e
@ -46,24 +46,14 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Closure includeSourcesInDokka(String... approximateNames) {
|
private List<SourceDirectorySet> findSourcesWithName(String... approximateNames) {
|
||||||
return {
|
return parent.subprojects
|
||||||
parent.subprojects.forEach {
|
.findAll { it != project }
|
||||||
if (it != project) {
|
.collectMany { it.kotlin.sourceSets }
|
||||||
File srcDir = new File(it.projectDir.absolutePath, "src")
|
.findAll { sourceSet -> approximateNames.any {
|
||||||
if (srcDir.exists() && srcDir.isDirectory()) {
|
nameToFilter -> sourceSet.name.contains(nameToFilter)
|
||||||
srcDir.eachFile { file ->
|
|
||||||
if (approximateNames.any { file.name.contains(it) } && file.isDirectory()) {
|
|
||||||
String pathToSrc = file.absolutePath
|
|
||||||
sourceRoot {
|
|
||||||
path = pathToSrc
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}.collect { it.kotlin }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.dokkaHtml {
|
tasks.dokkaHtml {
|
||||||
@ -88,15 +78,15 @@ tasks.dokkaHtml {
|
|||||||
}
|
}
|
||||||
|
|
||||||
named("commonMain") {
|
named("commonMain") {
|
||||||
includeSourcesInDokka("commonMain")
|
sourceRoots.setFrom(findSourcesWithName("commonMain"))
|
||||||
}
|
}
|
||||||
|
|
||||||
named("jsMain") {
|
named("jsMain") {
|
||||||
includeSourcesInDokka("jsMain/*", "commonMain/*")
|
sourceRoots.setFrom(findSourcesWithName("jsMain", "commonMain"))
|
||||||
}
|
}
|
||||||
|
|
||||||
named("jvmMain") {
|
named("jvmMain") {
|
||||||
includeSourcesInDokka("jvmMain/*", "commonMain/*")
|
sourceRoots.setFrom(findSourcesWithName("jvmMain", "commonMain"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user