mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-27 20:48:44 +00:00
commit
eb97a8e151
@ -46,29 +46,17 @@ 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 }
|
||||||
}
|
}
|
||||||
|
|
||||||
dokka {
|
tasks.dokkaHtml {
|
||||||
outputFormat = 'html'
|
|
||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case project.hasProperty("DOKKA_PATH"):
|
case project.hasProperty("DOKKA_PATH"):
|
||||||
outputDirectory = project.property("DOKKA_PATH").toString()
|
outputDirectory = project.property("DOKKA_PATH").toString()
|
||||||
@ -78,19 +66,27 @@ dokka {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
multiplatform {
|
dokkaSourceSets {
|
||||||
global {
|
configureEach {
|
||||||
skipDeprecated = true
|
skipDeprecated.set(true)
|
||||||
|
|
||||||
sourceLink {
|
sourceLink {
|
||||||
path = "./"
|
localDirectory.set(file("./"))
|
||||||
url = "https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/"
|
remoteUrl.set(new URL("https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/"))
|
||||||
lineSuffix = "#L"
|
remoteLineSuffix.set("#L")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
common(includeSourcesInDokka("commonMain"))
|
named("commonMain") {
|
||||||
js(includeSourcesInDokka("jsMain"/*, "commonMain"*/))
|
sourceRoots.setFrom(findSourcesWithName("commonMain"))
|
||||||
jvm(includeSourcesInDokka("jvmMain"/*, "commonMain"*/))
|
}
|
||||||
|
|
||||||
|
named("jsMain") {
|
||||||
|
sourceRoots.setFrom(findSourcesWithName("jsMain", "commonMain"))
|
||||||
|
}
|
||||||
|
|
||||||
|
named("jvmMain") {
|
||||||
|
sourceRoots.setFrom(findSourcesWithName("jvmMain", "commonMain"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
dokka_version=0.10.1
|
dokka_version=1.4.0
|
||||||
|
|
||||||
org.gradle.jvmargs=-Xmx1024m
|
org.gradle.jvmargs=-Xmx1024m
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
org.gradle.jvmargs=-Xmx1024m
|
org.gradle.jvmargs=-Xmx2048m
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
kotlin.js.generate.externals=true
|
kotlin.js.generate.externals=true
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
include ":tgbotapi.core"
|
include ":tgbotapi.core"
|
||||||
include ":tgbotapi.extensions.api"
|
include ":tgbotapi.extensions.api"
|
||||||
include ":tgbotapi.extensions.utils"
|
include ":tgbotapi.extensions.utils"
|
||||||
|
Loading…
Reference in New Issue
Block a user