From 1d5caeed6236043866e7e9f1e7d2502001f01257 Mon Sep 17 00:00:00 2001 From: KwakEuiJin Date: Fri, 16 Aug 2024 22:07:01 +0900 Subject: [PATCH] =?UTF-8?q?Maven=20publish=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle/libs.versions.toml | 20 ++++++++++--------- picker/build.gradle.kts | 42 ++++++++++++++++++++++++++++++++++++++- settings.gradle.kts | 1 + 3 files changed, 53 insertions(+), 10 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b91e40d..33f647e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,6 +11,9 @@ composeBom = "2024.06.00" appcompat = "1.7.0" material = "1.12.0" kotlinx-datetime = "0.6.0" +vankiktechMaven = "0.28.0" +compose-android = "1.6.8" +material3 = "1.2.1" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } @@ -20,15 +23,13 @@ androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-co androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" } androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" } androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } -androidx-ui = { group = "androidx.compose.ui", name = "ui" } -androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" } -androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" } -androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" } -androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" } -androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" } -androidx-material3 = { group = "androidx.compose.material3", name = "material3" } -androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } -material = { group = "com.google.android.material", name = "material", version.ref = "material" } +androidx-ui = { group = "androidx.compose.ui", name = "ui", version.ref = "compose-android" } +androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics", version.ref = "compose-android" } +androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "compose-android" } +androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview", version.ref = "compose-android" } +androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest", version.ref = "compose-android" } +androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4", version.ref = "compose-android" } +androidx-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "material3"} kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" } [plugins] @@ -36,5 +37,6 @@ android-application = { id = "com.android.application", version.ref = "agp" } jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } android-library = { id = "com.android.library", version.ref = "agp" } compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +vanniktech-maven = { id = "com.vanniktech.maven.publish", version.ref = "vankiktechMaven" } diff --git a/picker/build.gradle.kts b/picker/build.gradle.kts index 342ebae..673bd6e 100644 --- a/picker/build.gradle.kts +++ b/picker/build.gradle.kts @@ -1,9 +1,15 @@ +import com.vanniktech.maven.publish.SonatypeHost + plugins { alias(libs.plugins.android.library) alias(libs.plugins.jetbrains.kotlin.android) alias(libs.plugins.compose.compiler) + alias(libs.plugins.vanniktech.maven) } +group = "io.github.KwaEuiJin" +version = "0.0.1" + android { namespace = "com.kez.picker" compileSdk = 34 @@ -41,7 +47,6 @@ dependencies { implementation(libs.androidx.core.ktx) implementation(libs.androidx.lifecycle.runtime.ktx) implementation(libs.androidx.activity.compose) - implementation(platform(libs.androidx.compose.bom)) implementation(libs.androidx.ui) implementation(libs.androidx.ui.graphics) implementation(libs.androidx.ui.tooling.preview) @@ -51,4 +56,39 @@ dependencies { androidTestImplementation(libs.androidx.espresso.core) implementation(libs.kotlinx.datetime) +} + +mavenPublishing { + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) + + signAllPublications() + + coordinates("io.github.KwakEuiJin", "compose-datepicker", "0.0.1") + + pom { + name = "Compose-DatePicker" + description = "Compose DatePicker" + url = "https://github.com/KwakEuiJin/Compose-DatePicker" + inceptionYear = "2024" + + licenses { + license { + name = "The Apache License, Version 2.0" + url = "http://www.apache.org/licenses/LICENSE-2.0.txt" + } + } + developers { + developer { + id = "KwakEuiJin" + name = "KEZ" + url = "https://github.com/KwakEuiJin" + } + } + + scm { + url.set("https://github.com/KwakEuiJin/Compose-DatePicker") + connection.set("scm:git:git://github.com/KwakEuiJin/Compose-DatePicker.git") + developerConnection.set("scm:git:ssh://git@github.com/KwakEuiJin/Compose-DatePicker.git") + } + } } \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 618d307..c2136f9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,6 @@ pluginManagement { repositories { + google() google { content { includeGroupByRegex("com\\.android.*")