mirror of
https://github.com/BetterAndroid/Hikage.git
synced 2025-10-18 10:09:21 +08:00
style: optimizing code style
This commit is contained in:
@@ -23,6 +23,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()
|
||||||
@@ -33,10 +34,12 @@ libraryProjects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configure<MavenPublishBaseExtension> {
|
configure<MavenPublishBaseExtension> {
|
||||||
if (name != Libraries.HIKAGE_COMPILER)
|
if (name != Libraries.HIKAGE_COMPILER)
|
||||||
configure(AndroidSingleVariantLibrary(publishJavadocJar = false))
|
configure(AndroidSingleVariantLibrary(publishJavadocJar = false))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only apply to publishable tasks.
|
// Only apply to publishable tasks.
|
||||||
if (gradle.startParameter.taskNames.any { it.startsWith("publish") })
|
if (gradle.startParameter.taskNames.any { it.startsWith("publish") })
|
||||||
if (name != Libraries.HIKAGE_COMPILER)
|
if (name != Libraries.HIKAGE_COMPILER)
|
||||||
@@ -48,10 +51,12 @@ libraryProjects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<DokkaTask>().configureEach {
|
tasks.withType<DokkaTask>().configureEach {
|
||||||
val configuration = """{ "footerMessage": "Hikage | Apache-2.0 License | Copyright (C) 2019 HighCapable" }"""
|
val configuration = """{ "footerMessage": "Hikage | 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")
|
||||||
@@ -61,6 +66,7 @@ libraryProjects {
|
|||||||
.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,7 +25,9 @@ kotlin {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(com.google.devtools.ksp.symbol.processing.api)
|
compileOnly(com.google.devtools.ksp.symbol.processing.api)
|
||||||
|
|
||||||
ksp(dev.zacsweers.autoservice.auto.service.ksp)
|
ksp(dev.zacsweers.autoservice.auto.service.ksp)
|
||||||
|
|
||||||
implementation(com.google.auto.service.auto.service.annotations)
|
implementation(com.google.auto.service.auto.service.annotations)
|
||||||
implementation(com.squareup.kotlinpoet)
|
implementation(com.squareup.kotlinpoet)
|
||||||
implementation(com.squareup.kotlinpoet.ksp)
|
implementation(com.squareup.kotlinpoet.ksp)
|
||||||
|
@@ -41,6 +41,7 @@ dependencies {
|
|||||||
compileOnly(org.jetbrains.kotlin.kotlin.stdlib)
|
compileOnly(org.jetbrains.kotlin.kotlin.stdlib)
|
||||||
compileOnly(com.android.tools.lint.lint.api)
|
compileOnly(com.android.tools.lint.lint.api)
|
||||||
compileOnly(com.android.tools.lint.lint.checks)
|
compileOnly(com.android.tools.lint.lint.checks)
|
||||||
|
|
||||||
testImplementation(com.android.tools.lint.lint)
|
testImplementation(com.android.tools.lint.lint)
|
||||||
testImplementation(com.android.tools.lint.lint.tests)
|
testImplementation(com.android.tools.lint.lint.tests)
|
||||||
}
|
}
|
@@ -32,14 +32,18 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
lintPublish(projects.hikageCoreLint)
|
lintPublish(projects.hikageCoreLint)
|
||||||
|
|
||||||
ksp(projects.hikageCompiler)
|
ksp(projects.hikageCompiler)
|
||||||
|
|
||||||
|
api(com.highcapable.betterandroid.ui.extension)
|
||||||
|
|
||||||
implementation(org.lsposed.hiddenapibypass.hiddenapibypass)
|
implementation(org.lsposed.hiddenapibypass.hiddenapibypass)
|
||||||
implementation(com.highcapable.kavaref.kavaref.core)
|
implementation(com.highcapable.kavaref.kavaref.core)
|
||||||
implementation(com.highcapable.kavaref.kavaref.extension)
|
implementation(com.highcapable.kavaref.kavaref.extension)
|
||||||
api(com.highcapable.betterandroid.ui.extension)
|
|
||||||
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)
|
||||||
|
@@ -31,6 +31,7 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(projects.hikageCore)
|
implementation(projects.hikageCore)
|
||||||
|
|
||||||
implementation(com.highcapable.kavaref.kavaref.core)
|
implementation(com.highcapable.kavaref.kavaref.core)
|
||||||
implementation(com.highcapable.kavaref.kavaref.extension)
|
implementation(com.highcapable.kavaref.kavaref.extension)
|
||||||
implementation(com.highcapable.betterandroid.ui.component)
|
implementation(com.highcapable.betterandroid.ui.component)
|
||||||
@@ -39,6 +40,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)
|
||||||
|
@@ -32,6 +32,7 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(projects.hikageCore)
|
implementation(projects.hikageCore)
|
||||||
|
|
||||||
implementation(com.highcapable.kavaref.kavaref.core)
|
implementation(com.highcapable.kavaref.kavaref.core)
|
||||||
implementation(com.highcapable.kavaref.kavaref.extension)
|
implementation(com.highcapable.kavaref.kavaref.extension)
|
||||||
implementation(com.highcapable.betterandroid.ui.extension)
|
implementation(com.highcapable.betterandroid.ui.extension)
|
||||||
@@ -39,6 +40,7 @@ dependencies {
|
|||||||
implementation(androidx.core.core.ktx)
|
implementation(androidx.core.core.ktx)
|
||||||
implementation(androidx.appcompat.appcompat)
|
implementation(androidx.appcompat.appcompat)
|
||||||
implementation(androidx.compose.ui.ui)
|
implementation(androidx.compose.ui.ui)
|
||||||
|
|
||||||
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)
|
||||||
|
@@ -31,6 +31,7 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(projects.hikageCore)
|
implementation(projects.hikageCore)
|
||||||
|
|
||||||
implementation(com.highcapable.kavaref.kavaref.core)
|
implementation(com.highcapable.kavaref.kavaref.core)
|
||||||
implementation(com.highcapable.kavaref.kavaref.extension)
|
implementation(com.highcapable.kavaref.kavaref.extension)
|
||||||
implementation(com.highcapable.betterandroid.ui.extension)
|
implementation(com.highcapable.betterandroid.ui.extension)
|
||||||
@@ -38,6 +39,7 @@ dependencies {
|
|||||||
implementation(androidx.core.core.ktx)
|
implementation(androidx.core.core.ktx)
|
||||||
implementation(androidx.appcompat.appcompat)
|
implementation(androidx.appcompat.appcompat)
|
||||||
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)
|
||||||
|
@@ -31,7 +31,7 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
ksp(projects.hikageCompiler)
|
ksp(projects.hikageCompiler)
|
||||||
implementation(projects.hikageCore)
|
|
||||||
api(androidx.appcompat.appcompat)
|
api(androidx.appcompat.appcompat)
|
||||||
api(androidx.constraintlayout.constraintlayout)
|
api(androidx.constraintlayout.constraintlayout)
|
||||||
api(androidx.coordinatorlayout.coordinatorlayout)
|
api(androidx.coordinatorlayout.coordinatorlayout)
|
||||||
@@ -42,6 +42,9 @@ dependencies {
|
|||||||
api(androidx.viewpager.viewpager)
|
api(androidx.viewpager.viewpager)
|
||||||
api(androidx.viewpager2.viewpager2)
|
api(androidx.viewpager2.viewpager2)
|
||||||
api(androidx.recyclerview.recyclerview)
|
api(androidx.recyclerview.recyclerview)
|
||||||
|
|
||||||
|
implementation(projects.hikageCore)
|
||||||
|
|
||||||
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)
|
||||||
|
@@ -31,8 +31,11 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
ksp(projects.hikageCompiler)
|
ksp(projects.hikageCompiler)
|
||||||
implementation(projects.hikageCore)
|
|
||||||
api(com.google.android.material.material)
|
api(com.google.android.material.material)
|
||||||
|
|
||||||
|
implementation(projects.hikageCore)
|
||||||
|
|
||||||
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)
|
||||||
|
@@ -27,6 +27,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
|
||||||
@@ -35,17 +36,20 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
ksp(projects.hikageCompiler)
|
ksp(projects.hikageCompiler)
|
||||||
|
|
||||||
implementation(projects.hikageCore)
|
implementation(projects.hikageCore)
|
||||||
implementation(projects.hikageExtension)
|
implementation(projects.hikageExtension)
|
||||||
implementation(projects.hikageExtensionBetterandroid)
|
implementation(projects.hikageExtensionBetterandroid)
|
||||||
implementation(projects.hikageWidgetAndroidx)
|
implementation(projects.hikageWidgetAndroidx)
|
||||||
implementation(projects.hikageWidgetMaterial)
|
implementation(projects.hikageWidgetMaterial)
|
||||||
|
|
||||||
implementation(com.highcapable.pangutext.pangutext.android)
|
implementation(com.highcapable.pangutext.pangutext.android)
|
||||||
implementation(com.highcapable.betterandroid.ui.component)
|
implementation(com.highcapable.betterandroid.ui.component)
|
||||||
implementation(com.highcapable.betterandroid.ui.extension)
|
implementation(com.highcapable.betterandroid.ui.extension)
|
||||||
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)
|
||||||
|
@@ -6,12 +6,19 @@ 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(
|
project(
|
||||||
":hikage-core",
|
":hikage-core",
|
||||||
":hikage-core-lint",
|
":hikage-core-lint",
|
||||||
@@ -27,7 +34,9 @@ sweetProperty {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "Hikage"
|
rootProject.name = "Hikage"
|
||||||
|
|
||||||
include(":samples:app")
|
include(":samples:app")
|
||||||
include(
|
include(
|
||||||
":hikage-core",
|
":hikage-core",
|
||||||
|
Reference in New Issue
Block a user