Skip to content

Commit 59a2532

Browse files
committed
fix(kit-plugin): resolve android-kit-base VERSION from root project
Kit subprojects may not see ORG_GRADLE_PROJECT_VERSION / VERSION; falling back to rootProject avoids '+' and matches publishMavenPublicationToMavenLocal. Made-with: Cursor
1 parent cda6792 commit 59a2532

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

kit-plugin/src/main/groovy/com/mparticle/kits/KitPlugin.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ class KitPlugin implements Plugin<Project> {
1515
configureRepositories(target.buildscript.repositories, mparticleFromMavenLocalOnly)
1616
configureRepositories(target.repositories, mparticleFromMavenLocalOnly)
1717
target.configurations.create('deployerJars')
18-
def kitBaseVersion = target.findProperty('VERSION') ?: '+'
18+
// VERSION from CI is often set only on the root project (e.g. ORG_GRADLE_PROJECT_VERSION); kit
19+
// subprojects do not always inherit it, which would fall back to '+' and unstable resolution.
20+
def kitBaseVersion =
21+
target.findProperty('VERSION') ?: target.rootProject.findProperty('VERSION') ?: '+'
1922
target.dependencies.add('api', 'com.mparticle:android-kit-base:' + kitBaseVersion)
2023
target.dependencies.add('testImplementation', 'junit:junit:4.13.2')
2124
target.dependencies.add('testImplementation', 'org.mockito:mockito-core:1.10.19')

0 commit comments

Comments
 (0)