diff --git a/build.gradle.kts b/build.gradle.kts index 4ba26fb..0d5188a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 { configure(AndroidSingleVariantLibrary(publishJavadocJar = false)) } } + tasks.withType().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) } diff --git a/demo-android/build.gradle.kts b/demo-android/build.gradle.kts index d42d8fb..a28a12a 100644 --- a/demo-android/build.gradle.kts +++ b/demo-android/build.gradle.kts @@ -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) diff --git a/pangutext-android/build.gradle.kts b/pangutext-android/build.gradle.kts index 7ebdda5..7fa961a 100644 --- a/pangutext-android/build.gradle.kts +++ b/pangutext-android/build.gradle.kts @@ -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) diff --git a/settings.gradle.kts b/settings.gradle.kts index 3bc7fe4..7b79196 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -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") \ No newline at end of file