diff --git a/build.gradle b/build.gradle index 0975726..24d2b3a 100644 --- a/build.gradle +++ b/build.gradle @@ -2,31 +2,10 @@ buildscript { ext { compose_compiler = '1.3.2' - GROUP_ID = "io.github.pseudoankit" - ARTIFACT_ID = "coachmark" - VERSION = "1.0.0" // (System.getenv("RELEASE_TAG_NAME") ?: "SNAPSHOT").replace("v", "") - SITE_URL = 'https://github.com/pseudoankit/coachmark' - GIT_URL = 'https://github.com/pseudoankit/coachmark.git' } } plugins { id 'com.android.application' version '8.0.1' apply false id 'com.android.library' version '8.0.1' apply false id 'org.jetbrains.kotlin.android' version '1.7.20' apply false - id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' } - -nexusPublishing { - repositories { - sonatype { //only for users registered in Sonatype after 24 Feb 2021 - nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) - username = System.getenv("OSS_USERNAME") - password = System.getenv("OSS_PASSWORD") - stagingProfileId = System.getenv("OSS_STAGING_PROFILE_ID") - } - } -} - -group = GROUP_ID -version = VERSION \ No newline at end of file diff --git a/coachmark/build.gradle b/coachmark/build.gradle index 6ef2b22..23ebb6b 100644 --- a/coachmark/build.gradle +++ b/coachmark/build.gradle @@ -1,11 +1,8 @@ plugins { id 'com.android.library' id 'org.jetbrains.kotlin.android' - id 'maven-publish' } -apply from: '../publish.gradle' - kotlin { explicitApi = 'strict' } @@ -51,3 +48,16 @@ dependencies { implementation 'androidx.compose.ui:ui-tooling-preview' implementation 'androidx.compose.material3:material3' } + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + groupId = 'com.pseudoankit' + artifactId = 'compose-coachmark' + version = '1.0.0' + } + } + } +} diff --git a/publish.gradle b/publish.gradle deleted file mode 100644 index a08a208..0000000 --- a/publish.gradle +++ /dev/null @@ -1,67 +0,0 @@ -apply plugin: 'maven-publish' -apply plugin: 'signing' - -// If you want to publish your sources as well -task androidSourcesJar(type: Jar) { - archiveClassifier.set('sources') - from android.sourceSets.main.java.srcDirs - from android.sourceSets.main.kotlin.srcDirs -} - -artifacts { - archives androidSourcesJar -} - -group = GROUP_ID -version = VERSION - -afterEvaluate { - publishing { - publications { - release(MavenPublication) { - - groupId GROUP_ID - artifactId ARTIFACT_ID - version VERSION - - from components.release - artifact androidSourcesJar - - pom { - name = ARTIFACT_ID - description = 'An android library to create onboarding flow with compose' - url = SITE_URL - licenses { - // Your licensing information - license { - name = 'The Apache Software License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - } - } - developers { - developer { - id = 'pseudoankit' - name = 'Ankit Kumar' - email = 'lostankit7@gmail.com' - } - } - - scm { - connection = GIT_URL - developerConnection = GIT_URL - url = SITE_URL - } - } - } - } - } -} - -signing { - useInMemoryPgpKeys( - System.getenv("OSS_SIGNING_KEY_ID"), - System.getenv("OSS_SIGNING_KEY"), - System.getenv("OSS_SIGNING_PASSWORD"), - ) - sign publishing.publications -} \ No newline at end of file