mirror of
https://github.com/BetterAndroid/PanguText.git
synced 2025-10-19 02:49:21 +08:00
style: optimizing code style
This commit is contained in:
@@ -19,6 +19,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()
|
||||||
@@ -29,23 +30,28 @@ libraryProjects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configure<MavenPublishBaseExtension> {
|
configure<MavenPublishBaseExtension> {
|
||||||
configure(AndroidSingleVariantLibrary(publishJavadocJar = false))
|
configure(AndroidSingleVariantLibrary(publishJavadocJar = false))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<DokkaTask>().configureEach {
|
tasks.withType<DokkaTask>().configureEach {
|
||||||
val configuration = """{ "footerMessage": "PanguText | Apache-2.0 License | Copyright (C) 2019 HighCapable" }"""
|
val configuration = """{ "footerMessage": "PanguText | 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,6 +25,7 @@ android {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
buildConfig = true
|
buildConfig = true
|
||||||
viewBinding = true
|
viewBinding = true
|
||||||
@@ -33,6 +34,7 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(projects.pangutextAndroid)
|
implementation(projects.pangutextAndroid)
|
||||||
|
|
||||||
implementation(com.highcapable.betterandroid.ui.component)
|
implementation(com.highcapable.betterandroid.ui.component)
|
||||||
implementation(com.highcapable.betterandroid.ui.component.adapter)
|
implementation(com.highcapable.betterandroid.ui.component.adapter)
|
||||||
implementation(com.highcapable.betterandroid.ui.extension)
|
implementation(com.highcapable.betterandroid.ui.extension)
|
||||||
@@ -41,6 +43,7 @@ dependencies {
|
|||||||
implementation(androidx.appcompat.appcompat)
|
implementation(androidx.appcompat.appcompat)
|
||||||
implementation(com.google.android.material.material)
|
implementation(com.google.android.material.material)
|
||||||
implementation(androidx.constraintlayout.constraintlayout)
|
implementation(androidx.constraintlayout.constraintlayout)
|
||||||
|
|
||||||
testImplementation(junit.junit)
|
testImplementation(junit.junit)
|
||||||
androidTestImplementation(androidx.test.ext.junit)
|
androidTestImplementation(androidx.test.ext.junit)
|
||||||
androidTestImplementation(androidx.test.espresso.espresso.core)
|
androidTestImplementation(androidx.test.espresso.espresso.core)
|
||||||
|
@@ -36,6 +36,7 @@ dependencies {
|
|||||||
implementation(com.highcapable.betterandroid.system.extension)
|
implementation(com.highcapable.betterandroid.system.extension)
|
||||||
implementation(androidx.core.core.ktx)
|
implementation(androidx.core.core.ktx)
|
||||||
implementation(androidx.appcompat.appcompat)
|
implementation(androidx.appcompat.appcompat)
|
||||||
|
|
||||||
testImplementation(junit.junit)
|
testImplementation(junit.junit)
|
||||||
androidTestImplementation(androidx.test.ext.junit)
|
androidTestImplementation(androidx.test.ext.junit)
|
||||||
androidTestImplementation(androidx.test.espresso.espresso.core)
|
androidTestImplementation(androidx.test.espresso.espresso.core)
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
@@ -6,18 +7,27 @@ 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"
|
||||||
}
|
}
|
||||||
|
|
||||||
sweetProperty {
|
sweetProperty {
|
||||||
rootProject { all { isEnable = false } }
|
rootProject {
|
||||||
|
all {
|
||||||
|
isEnable = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
project(":pangutext-android") {
|
project(":pangutext-android") {
|
||||||
sourcesCode {
|
sourcesCode {
|
||||||
isEnableRestrictedAccess = true
|
isEnableRestrictedAccess = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "PanguText"
|
rootProject.name = "PanguText"
|
||||||
|
|
||||||
include(":demo-android")
|
include(":demo-android")
|
||||||
include(":pangutext-android")
|
include(":pangutext-android")
|
Reference in New Issue
Block a user