Skip to content

Commit

Permalink
Add maven publish version in environment variables (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-radhika-s authored Jul 28, 2022
1 parent 67eef0e commit eedf318
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions scripts/publish-module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ artifacts {
archives androidSourcesJar
}
group = PUBLISH_GROUP_ID
version = PUBLISH_VERSION
version = rootProject.ext["publish_version"]

afterEvaluate {
publishing {
Expand All @@ -24,7 +24,7 @@ afterEvaluate {
// we'll set up later
groupId PUBLISH_GROUP_ID
artifactId PUBLISH_ARTIFACT_ID
version PUBLISH_VERSION
version rootProject.ext["publish_version"]

/// Two artifacts, the `aar` (or `jar`) and the sources
if (project.plugins.findPlugin("com.android.library")) {
Expand Down
2 changes: 2 additions & 0 deletions scripts/publish-root.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ext["signing.keyId"] = ''
ext["signing.password"] = ''
ext["signing.key"] = ''
ext["snapshot"] = ''
ext["publish_version"] = ''

File secretPropsFile = project.rootProject.file('local.properties')

Expand All @@ -28,6 +29,7 @@ if (secretPropsFile.exists()) {
ext["signing.password"] = System.getenv('SIGNING_PASSWORD')
ext["signing.key"] = System.getenv('SIGNING_KEY')
ext["snapshot"] = System.getenv('SNAPSHOT')
ext["publish_version"] = System.getenv('PUBLISH_VERSION')
}

// Set up Sonatype repository
Expand Down
1 change: 0 additions & 1 deletion showcase/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ plugins {

ext {
PUBLISH_GROUP_ID = 'com.canopas.intro-showcase-view'
PUBLISH_VERSION = '1.0.6'
PUBLISH_ARTIFACT_ID = 'introshowcaseview'
}

Expand Down

0 comments on commit eedf318

Please sign in to comment.