diff --git a/coachmark/build.gradle b/coachmark/build.gradle index cf2b89a..f998af7 100644 --- a/coachmark/build.gradle +++ b/coachmark/build.gradle @@ -5,6 +5,11 @@ plugins { apply from: '../publish-package.gradle' +ext { + VERSION_NAME = "1.0.2" + ARTIFACT_ID = "coachmark" +} + kotlin { explicitApi = 'strict' } @@ -16,17 +21,8 @@ android { defaultConfig { minSdk 19 targetSdk 34 - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 diff --git a/gradle.properties b/gradle.properties index 7dcfee6..3c5031e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,20 +20,4 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true -# Maven details -VERSION_NAME=1.0.0 -VERSION_CODE=1 -GROUP=io.github.pseudoankit -POM_DESCRIPTION=Compose library to add coachmark -POM_URL=https://github.com/pseudoankit/coachmark -POM_SCM_CONNECTION=scm:git@github.com:pseudoankit/coachmark.git -POM_DEVELOPER_ID=pseudoankit -POM_DEVELOPER_NAME=Ankit Kumar -POM_DEVELOPER_EMAIL=lostankit7@gmail.com -#**** -signing.keyId= -signing.password= -signing.secretKeyRingFile= -ossrhUsername= -ossrhPassword= +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/publish-package.gradle b/publish-package.gradle index 2a4b1c4..d0f3ae4 100644 --- a/publish-package.gradle +++ b/publish-package.gradle @@ -44,10 +44,7 @@ afterEvaluate { from components.release -// artifact androidJavadocJar -// artifact javaSourcesJar - - groupId GROUP + groupId GROUP_ID version VERSION_NAME pom { name = artifactId @@ -55,8 +52,8 @@ afterEvaluate { url = POM_URL licenses { license { - name = 'The Apache Software License, Version 2.0' - url = 'https://www.apache.org/licenses/LICENSE-2.0.txt' + name = LICENCE_NAME + url = LICENCE_URL } } scm { @@ -66,9 +63,9 @@ afterEvaluate { } developers { developer { - id = POM_DEVELOPER_ID - name = POM_DEVELOPER_NAME - email = POM_DEVELOPER_EMAIL + id = 'pseudoankit' + name = 'Ankit Kumar' + email = 'lostankit7@gmail.com' } } } @@ -84,8 +81,8 @@ afterEvaluate { url = "https://s01.oss.sonatype.org/content/repositories/snapshots/" credentials { - username ossrhUsername - password ossrhPassword + username OSS_USERNAME + password OSS_PASSWORD } } @@ -98,14 +95,31 @@ afterEvaluate { url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" credentials { - username ossrhUsername - password ossrhPassword + username OSS_USERNAME + password OSS_PASSWORD } } } } } +ext { + GROUP_ID = "io.github.pseudoankit" + + POM_DESCRIPTION = "Compose library to add coachmark" + POM_URL = "https://github.com/pseudoankit/coachmark" + POM_SCM_CONNECTION = "scm:git@github.com:pseudoankit/coachmark.git" + + OSS_USERNAME = System.getenv("OSS_USERNAME") + OSS_PASSWORD = System.getenv("OSS_PASSWORD") + ext."signing.keyId" = System.getenv("SIGNING_KEY_ID") + ext."signing.password" = System.getenv("SIGNING_PASSWORD") + ext."signing.secretKeyRingFile" = System.getenv("SIGNING_SECRET_KEY_RING_FILE") + + LICENCE_NAME = "The Apache Software License, Version 2.0" + LICENCE_URL = "https://www.apache.org/licenses/LICENSE-2.0.txt" +} + signing { sign publishing.publications } \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index e5af097..ee136ab 100644 --- a/settings.gradle +++ b/settings.gradle @@ -10,7 +10,6 @@ dependencyResolutionManagement { repositories { google() mavenCentral() - maven { url 'https://jitpack.io' } } } rootProject.name = "coachmark"