mirror of
https://github.com/HighCapable/KavaRef.git
synced 2025-10-18 13:19:21 +08:00
style: optimizing code style
This commit is contained in:
@@ -13,6 +13,7 @@ libraryProjects {
|
|||||||
val repositoryDir = gradle.gradleUserHomeDir
|
val repositoryDir = gradle.gradleUserHomeDir
|
||||||
.resolve("highcapable-maven-repository")
|
.resolve("highcapable-maven-repository")
|
||||||
.resolve("repository")
|
.resolve("repository")
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
name = "HighCapableMavenReleases"
|
name = "HighCapableMavenReleases"
|
||||||
url = repositoryDir.resolve("releases").toURI()
|
url = repositoryDir.resolve("releases").toURI()
|
||||||
@@ -24,19 +25,23 @@ libraryProjects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<DokkaTask>().configureEach {
|
tasks.withType<DokkaTask>().configureEach {
|
||||||
val configuration = """{ "footerMessage": "KavaRef | Apache-2.0 License | Copyright (C) 2019 HighCapable" }"""
|
val configuration = """{ "footerMessage": "KavaRef | Apache-2.0 License | Copyright (C) 2019 HighCapable" }"""
|
||||||
pluginsMapConfiguration.set(mapOf("org.jetbrains.dokka.base.DokkaBase" to configuration))
|
pluginsMapConfiguration.set(mapOf("org.jetbrains.dokka.base.DokkaBase" to configuration))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("publishKDoc") {
|
tasks.register("publishKDoc") {
|
||||||
group = "documentation"
|
group = "documentation"
|
||||||
dependsOn("dokkaHtml")
|
dependsOn("dokkaHtml")
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
val docsDir = rootProject.projectDir
|
val docsDir = rootProject.projectDir
|
||||||
.resolve("docs-source")
|
.resolve("docs-source")
|
||||||
.resolve("dist")
|
.resolve("dist")
|
||||||
.resolve("KDoc")
|
.resolve("KDoc")
|
||||||
.resolve(project.name)
|
.resolve(project.name)
|
||||||
|
|
||||||
if (docsDir.exists()) docsDir.deleteRecursively() else docsDir.mkdirs()
|
if (docsDir.exists()) docsDir.deleteRecursively() else docsDir.mkdirs()
|
||||||
layout.buildDirectory.dir("dokka/html").get().asFile.copyRecursively(docsDir)
|
layout.buildDirectory.dir("dokka/html").get().asFile.copyRecursively(docsDir)
|
||||||
}
|
}
|
||||||
|
@@ -25,4 +25,7 @@ kotlin {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation(projects.kavarefCore)
|
implementation(projects.kavarefCore)
|
||||||
implementation(projects.kavarefExtension)
|
implementation(projects.kavarefExtension)
|
||||||
|
|
||||||
|
// SLF4J Simple Logger
|
||||||
|
implementation(org.slf4j.slf4j.simple)
|
||||||
}
|
}
|
@@ -1,4 +1,5 @@
|
|||||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
@@ -6,13 +7,16 @@ pluginManagement {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.highcapable.sweetdependency") version "1.0.4"
|
id("com.highcapable.sweetdependency") version "1.0.4"
|
||||||
id("com.highcapable.sweetproperty") version "1.0.8"
|
id("com.highcapable.sweetproperty") version "1.0.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
sweetDependency {
|
sweetDependency {
|
||||||
isEnableVerboseMode = false
|
isEnableVerboseMode = false
|
||||||
}
|
}
|
||||||
|
|
||||||
sweetProperty {
|
sweetProperty {
|
||||||
global {
|
global {
|
||||||
sourcesCode {
|
sourcesCode {
|
||||||
@@ -23,8 +27,15 @@ sweetProperty {
|
|||||||
isEnableRestrictedAccess = true
|
isEnableRestrictedAccess = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rootProject { all { isEnable = false } }
|
|
||||||
|
rootProject {
|
||||||
|
all {
|
||||||
|
isEnable = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "KavaRef"
|
rootProject.name = "KavaRef"
|
||||||
|
|
||||||
include(":kavaref-core", ":kavaref-extension", "kavaref-android-stub")
|
include(":kavaref-core", ":kavaref-extension", "kavaref-android-stub")
|
||||||
include(":samples:kavaref-demo")
|
include(":samples:kavaref-demo")
|
Reference in New Issue
Block a user