style: optimizing code style

This commit is contained in:
2025-09-18 13:05:06 +08:00
parent f565e297e9
commit df9b12d5d3
4 changed files with 21 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ libraryProjects {
val repositoryDir = gradle.gradleUserHomeDir
.resolve("highcapable-maven-repository")
.resolve("repository")
maven {
name = "HighCapableMavenReleases"
url = repositoryDir.resolve("releases").toURI()
@@ -29,23 +30,28 @@ libraryProjects {
}
}
}
configure<MavenPublishBaseExtension> {
configure(AndroidSingleVariantLibrary(publishJavadocJar = false))
}
}
tasks.withType<DokkaTask>().configureEach {
val configuration = """{ "footerMessage": "PanguText | Apache-2.0 License | Copyright (C) 2019 HighCapable" }"""
pluginsMapConfiguration.set(mapOf("org.jetbrains.dokka.base.DokkaBase" to configuration))
}
tasks.register("publishKDoc") {
group = "documentation"
dependsOn("dokkaHtml")
doLast {
val docsDir = rootProject.projectDir
.resolve("docs-source")
.resolve("dist")
.resolve("KDoc")
.resolve(project.name)
if (docsDir.exists()) docsDir.deleteRecursively() else docsDir.mkdirs()
layout.buildDirectory.dir("dokka/html").get().asFile.copyRecursively(docsDir)
}

View File

@@ -25,6 +25,7 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
buildFeatures {
buildConfig = true
viewBinding = true
@@ -33,6 +34,7 @@ android {
dependencies {
implementation(projects.pangutextAndroid)
implementation(com.highcapable.betterandroid.ui.component)
implementation(com.highcapable.betterandroid.ui.component.adapter)
implementation(com.highcapable.betterandroid.ui.extension)
@@ -41,6 +43,7 @@ dependencies {
implementation(androidx.appcompat.appcompat)
implementation(com.google.android.material.material)
implementation(androidx.constraintlayout.constraintlayout)
testImplementation(junit.junit)
androidTestImplementation(androidx.test.ext.junit)
androidTestImplementation(androidx.test.espresso.espresso.core)

View File

@@ -36,6 +36,7 @@ dependencies {
implementation(com.highcapable.betterandroid.system.extension)
implementation(androidx.core.core.ktx)
implementation(androidx.appcompat.appcompat)
testImplementation(junit.junit)
androidTestImplementation(androidx.test.ext.junit)
androidTestImplementation(androidx.test.espresso.espresso.core)

View File

@@ -1,4 +1,5 @@
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
pluginManagement {
repositories {
gradlePluginPortal()
@@ -6,18 +7,27 @@ pluginManagement {
mavenCentral()
}
}
plugins {
id("com.highcapable.sweetdependency") version "1.0.4"
id("com.highcapable.sweetproperty") version "1.0.8"
}
sweetProperty {
rootProject { all { isEnable = false } }
rootProject {
all {
isEnable = false
}
}
project(":pangutext-android") {
sourcesCode {
isEnableRestrictedAccess = true
}
}
}
rootProject.name = "PanguText"
include(":demo-android")
include(":pangutext-android")