diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml index 1e35d4cc2..4f65fdfbc 100644 --- a/.github/workflows/release-draft.yml +++ b/.github/workflows/release-draft.yml @@ -112,9 +112,24 @@ jobs: run: | echo "${{ steps.compose-version.outputs.new-version }}" > VERSION - - name: Publish to Maven local (smoke test) + - name: Publish core to Maven local (smoke test) run: ./gradlew publishMavenPublicationToMavenLocal -PVERSION=${{ steps.compose-version.outputs.new-version }} --no-build-cache + - name: Publish aggregate kits to Maven local (smoke test) + run: ./gradlew publishMavenPublicationToMavenLocal -PVERSION=${{ steps.compose-version.outputs.new-version }} -c settings-kits.gradle --no-build-cache + + - name: Publish isolated kit to Maven local (urbanairship-20 smoke test) + run: ./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true -p kits/urbanairship/urbanairship-20 -PVERSION=${{ steps.compose-version.outputs.new-version }} publishMavenPublicationToMavenLocal --no-build-cache + + - name: Publish isolated kit to Maven local (braze-43 smoke test) + run: ./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true -p kits/braze/braze-43 -PVERSION=${{ steps.compose-version.outputs.new-version }} publishMavenPublicationToMavenLocal --no-build-cache + + - name: Publish isolated kit to Maven local (ga-23 smoke test) + run: ./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true -p kits/ga/ga-23 -PVERSION=${{ steps.compose-version.outputs.new-version }} publishMavenPublicationToMavenLocal --no-build-cache + + - name: Publish isolated kit to Maven local (ga4-23 smoke test) + run: ./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true -p kits/ga4/ga4-23 -PVERSION=${{ steps.compose-version.outputs.new-version }} publishMavenPublicationToMavenLocal --no-build-cache + - name: Generate changelog entry id: changelog # Pinned SHA for Semgrep (no mutable @main); bump when upgrading the action. diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 858fe3751..445be8363 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -56,6 +56,21 @@ jobs: - name: Publish core to Maven local (required before kits can compile) run: ./gradlew publishMavenPublicationToMavenLocal -PVERSION=${{ needs.setup-and-version.outputs.final_version }} --no-build-cache + - name: Validate aggregate kit publications in Maven local + run: ./gradlew publishMavenPublicationToMavenLocal -PVERSION=${{ needs.setup-and-version.outputs.final_version }} -c settings-kits.gradle --no-build-cache + + - name: Validate isolated kit publication (urbanairship-20) + run: ./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true -p kits/urbanairship/urbanairship-20 -PVERSION=${{ needs.setup-and-version.outputs.final_version }} publishMavenPublicationToMavenLocal --no-build-cache + + - name: Validate isolated kit publication (braze-43) + run: ./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true -p kits/braze/braze-43 -PVERSION=${{ needs.setup-and-version.outputs.final_version }} publishMavenPublicationToMavenLocal --no-build-cache + + - name: Validate isolated kit publication (ga-23) + run: ./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true -p kits/ga/ga-23 -PVERSION=${{ needs.setup-and-version.outputs.final_version }} publishMavenPublicationToMavenLocal --no-build-cache + + - name: Validate isolated kit publication (ga4-23) + run: ./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true -p kits/ga4/ga4-23 -PVERSION=${{ needs.setup-and-version.outputs.final_version }} publishMavenPublicationToMavenLocal --no-build-cache + - name: Publish core to Maven Central run: ./gradlew publishMavenPublicationToMavenCentralRepository -PVERSION=${{ needs.setup-and-version.outputs.final_version }} --no-build-cache @@ -65,16 +80,16 @@ jobs: # Isolated Kotlin 2.2.x kits are excluded from settings-kits.gradle and must be # published from their own project roots (same pattern as CI test/lint steps). - name: Publish Isolated Kits (urbanairship-20) - run: ./gradlew -p kits/urbanairship/urbanairship-20 -PisRelease=true -PVERSION=${{ needs.setup-and-version.outputs.final_version }} publishMavenPublicationToMavenCentralRepository --no-build-cache + run: ./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true -p kits/urbanairship/urbanairship-20 -PVERSION=${{ needs.setup-and-version.outputs.final_version }} publishMavenPublicationToMavenCentralRepository --no-build-cache - name: Publish Isolated Kits (braze-43) - run: ./gradlew -p kits/braze/braze-43 -PisRelease=true -PVERSION=${{ needs.setup-and-version.outputs.final_version }} publishMavenPublicationToMavenCentralRepository --no-build-cache + run: ./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true -p kits/braze/braze-43 -PVERSION=${{ needs.setup-and-version.outputs.final_version }} publishMavenPublicationToMavenCentralRepository --no-build-cache - name: Publish Isolated Kits (ga-23) - run: ./gradlew -p kits/ga/ga-23 -PisRelease=true -PVERSION=${{ needs.setup-and-version.outputs.final_version }} publishMavenPublicationToMavenCentralRepository --no-build-cache + run: ./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true -p kits/ga/ga-23 -PVERSION=${{ needs.setup-and-version.outputs.final_version }} publishMavenPublicationToMavenCentralRepository --no-build-cache - name: Publish Isolated Kits (ga4-23) - run: ./gradlew -p kits/ga4/ga4-23 -PisRelease=true -PVERSION=${{ needs.setup-and-version.outputs.final_version }} publishMavenPublicationToMavenCentralRepository --no-build-cache + run: ./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true -p kits/ga4/ga4-23 -PVERSION=${{ needs.setup-and-version.outputs.final_version }} publishMavenPublicationToMavenCentralRepository --no-build-cache # rokt-sdk-plus (com.rokt:rokt-sdk-plus) is an umbrella over the mParticle Rokt kit + the # Rokt Payment Extension. The "Publish core to Maven local" step above already placed diff --git a/ONBOARDING.md b/ONBOARDING.md index 7d0d734ad..b7032df1f 100644 --- a/ONBOARDING.md +++ b/ONBOARDING.md @@ -92,8 +92,7 @@ Now we will build our Local Maven repository, this will allow us to make changes publish it locally so that we can test them. Run the following command in the terminal: -`./gradlew buildLocal` -`./gradlew -PisRelease=true clean publishReleaseLocal` +`./gradlew clean publishMavenPublicationToMavenLocal -PVERSION="$(head -n 1 VERSION)"` This will publish the core modules to mavenLocal(), you should see all .pom and .aar files located in your local /.m2 folder.) @@ -128,7 +127,7 @@ This will ensure faster running times and easier error troubleshooting. Now run the following command in the terminal: -`./gradlew -PisRelease=true clean testRelease publishReleaseLocal -c settings-kits.gradle` +`./gradlew clean testRelease publishMavenPublicationToMavenLocal -PVERSION="$(head -n 1 VERSION)" -c settings-kits.gradle` You can now work on the specific kits you need, test them and even contribute through pull requests. @@ -146,22 +145,29 @@ Kotlin version. - `kits/ga/ga-23` (Kotlin 2.2.x, `firebase-analytics:23.x`) - `kits/ga4/ga4-23` (Kotlin 2.2.x, `firebase-analytics:23.x`) -To build an isolated kit after publishing core to mavenLocal: +To build an isolated kit after publishing core to mavenLocal, run from the repository root: ```bash -cd kits/urbanairship/urbanairship-20 -./gradlew testRelease publishReleaseLocal +./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true \ + -p kits/urbanairship/urbanairship-20 \ + -PVERSION="$(head -n 1 VERSION)" \ + testRelease publishMavenPublicationToMavenLocal ``` The kit resolves `android-kit-base` from mavenLocal, so you must publish -the core first (`./gradlew -PisRelease=true publishReleaseLocal`). +the core first with the same exact `VERSION`. To verify all kits (main + isolated): ```bash -./gradlew -PisRelease=true publishReleaseLocal -./gradlew -PisRelease=true testRelease publishReleaseLocal -c settings-kits.gradle -cd kits/urbanairship/urbanairship-20 && ./gradlew -PisRelease=true testRelease +./gradlew publishMavenPublicationToMavenLocal -PVERSION="$(head -n 1 VERSION)" +./gradlew testRelease publishMavenPublicationToMavenLocal \ + -PVERSION="$(head -n 1 VERSION)" \ + -c settings-kits.gradle +./gradlew -Pmparticle.kit.mparticleFromMavenLocalOnly=true \ + -p kits/urbanairship/urbanairship-20 \ + -PVERSION="$(head -n 1 VERSION)" \ + testRelease publishMavenPublicationToMavenLocal ``` **Adding a new isolated kit:** If a kit upgrades to a Kotlin version @@ -170,9 +176,9 @@ incompatible with the root KGP (2.1.20), remove it from to the CI workflows following the urbanairship pattern. Also add a matching isolated publish step in `.github/workflows/release-publish.yml` (the aggregate `settings-kits.gradle` publish will not include it). -If the kit's standalone `rootProject.name` differs from the Maven -artifact id consumers expect, set `mparticleMavenPublish.artifactId` -explicitly in the kit `build.gradle` (see `braze-43`). +Include `build-logic` from the standalone settings file, declare the shared +publication plugin with `apply false`, and set `mparticleMavenPublish.artifactId` +explicitly in the kit `build.gradle`. ## Read More diff --git a/README.md b/README.md index d1a812e21..39c4485bd 100644 --- a/README.md +++ b/README.md @@ -38,29 +38,33 @@ dependencies { Kits maintained by mParticle are developed in this monorepo under the [`kits/`](kits) directory and deployed as individual Maven Central artifacts. The table below lists kits with a final v6 artifact available on Maven Central: -| Kit | Maven artifact | -| ------------------------------------------ | -------------------------------------------------------------------------------------------------------- | -| [Adjust](kits/adjust/adjust-5) | [`com.mparticle:adjust-5`](https://central.sonatype.com/artifact/com.mparticle/adjust-5) | -| [Adobe](kits/adobe/adobe) | [`com.mparticle:adobe`](https://central.sonatype.com/artifact/com.mparticle/adobe) | -| [AppsFlyer](kits/appsflyer/appsflyer-6) | [`com.mparticle:appsflyer-6`](https://central.sonatype.com/artifact/com.mparticle/appsflyer-6) | -| [Apptentive](kits/apptentive/apptentive-6) | [`com.mparticle:apptentive-6`](https://central.sonatype.com/artifact/com.mparticle/apptentive-6) | -| [Apptimize](kits/apptimize/apptimize-3) | [`com.mparticle:apptimize-3`](https://central.sonatype.com/artifact/com.mparticle/apptimize-3) | -| [Branch Metrics](kits/branch/branch-5) | [`com.mparticle:branch-5`](https://central.sonatype.com/artifact/com.mparticle/branch-5) | -| [Braze 38](kits/braze/braze-38) | [`com.mparticle:braze-38`](https://central.sonatype.com/artifact/com.mparticle/braze-38) | -| [Braze 39](kits/braze/braze-39) | [`com.mparticle:braze-39`](https://central.sonatype.com/artifact/com.mparticle/braze-39) | -| [Braze 40](kits/braze/braze-40) | [`com.mparticle:braze-40`](https://central.sonatype.com/artifact/com.mparticle/braze-40) | -| [Braze 41](kits/braze/braze-41) | [`com.mparticle:braze-41`](https://central.sonatype.com/artifact/com.mparticle/braze-41) | -| [CleverTap](kits/clevertap/clevertap-7) | [`com.mparticle:clevertap-7`](https://central.sonatype.com/artifact/com.mparticle/clevertap-7) | -| [comScore](kits/comscore/comscore-6) | [`com.mparticle:comscore-6`](https://central.sonatype.com/artifact/com.mparticle/comscore-6) | -| [Iterable](kits/iterable/iterable-3) | [`com.mparticle:iterable-3`](https://central.sonatype.com/artifact/com.mparticle/iterable-3) | -| [Kochava](kits/kochava/kochava-5) | [`com.mparticle:kochava-5`](https://central.sonatype.com/artifact/com.mparticle/kochava-5) | -| [Leanplum](kits/leanplum/leanplum-7) | [`com.mparticle:leanplum-7`](https://central.sonatype.com/artifact/com.mparticle/leanplum-7) | -| [Localytics](kits/localytics/localytics-6) | [`com.mparticle:localytics-6`](https://central.sonatype.com/artifact/com.mparticle/localytics-6) | -| [OneTrust](kits/onetrust/onetrust) | [`com.mparticle:onetrust`](https://central.sonatype.com/artifact/com.mparticle/onetrust) | -| [Optimizely](kits/optimizely/optimizely-3) | [`com.mparticle:optimizely-3`](https://central.sonatype.com/artifact/com.mparticle/optimizely-3) | -| [Radar](kits/radar/radar-3) | [`com.mparticle:radar-3`](https://central.sonatype.com/artifact/com.mparticle/radar-3) | -| [Rokt](kits/rokt/rokt) | [`com.mparticle:android-rokt-kit`](https://central.sonatype.com/artifact/com.mparticle/android-rokt-kit) | -| [Singular](kits/singular/singular-12) | [`com.mparticle:singular-12`](https://central.sonatype.com/artifact/com.mparticle/singular-12) | +| Kit | Maven artifact | +| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| [Adjust](kits/adjust/adjust-5) | [`com.mparticle:adjust-5`](https://central.sonatype.com/artifact/com.mparticle/adjust-5) | +| [Adobe](kits/adobe/adobe) | [`com.mparticle:adobe`](https://central.sonatype.com/artifact/com.mparticle/adobe) | +| [AppsFlyer](kits/appsflyer/appsflyer-6) | [`com.mparticle:appsflyer-6`](https://central.sonatype.com/artifact/com.mparticle/appsflyer-6) | +| [Apptentive](kits/apptentive/apptentive-6) | [`com.mparticle:apptentive-6`](https://central.sonatype.com/artifact/com.mparticle/apptentive-6) | +| [Apptimize](kits/apptimize/apptimize-3) | [`com.mparticle:apptimize-3`](https://central.sonatype.com/artifact/com.mparticle/apptimize-3) | +| [Branch Metrics](kits/branch/branch-5) | [`com.mparticle:branch-5`](https://central.sonatype.com/artifact/com.mparticle/branch-5) | +| [Braze 38](kits/braze/braze-38) | [`com.mparticle:braze-38`](https://central.sonatype.com/artifact/com.mparticle/braze-38) | +| [Braze 39](kits/braze/braze-39) | [`com.mparticle:braze-39`](https://central.sonatype.com/artifact/com.mparticle/braze-39) | +| [Braze 40](kits/braze/braze-40) | [`com.mparticle:braze-40`](https://central.sonatype.com/artifact/com.mparticle/braze-40) | +| [Braze 41](kits/braze/braze-41) | [`com.mparticle:braze-41`](https://central.sonatype.com/artifact/com.mparticle/braze-41) | +| [Braze 43](kits/braze/braze-43) | [`com.mparticle:braze-43`](https://central.sonatype.com/artifact/com.mparticle/braze-43) | +| [CleverTap](kits/clevertap/clevertap-7) | [`com.mparticle:clevertap-7`](https://central.sonatype.com/artifact/com.mparticle/clevertap-7) | +| [comScore](kits/comscore/comscore-6) | [`com.mparticle:comscore-6`](https://central.sonatype.com/artifact/com.mparticle/comscore-6) | +| [Google Analytics](kits/ga/ga-23) | [`com.mparticle:ga-23`](https://central.sonatype.com/artifact/com.mparticle/ga-23) | +| [Google Analytics 4](kits/ga4/ga4-23) | [`com.mparticle:ga4-23`](https://central.sonatype.com/artifact/com.mparticle/ga4-23) | +| [Iterable](kits/iterable/iterable-3) | [`com.mparticle:iterable-3`](https://central.sonatype.com/artifact/com.mparticle/iterable-3) | +| [Kochava](kits/kochava/kochava-5) | [`com.mparticle:kochava-5`](https://central.sonatype.com/artifact/com.mparticle/kochava-5) | +| [Leanplum](kits/leanplum/leanplum-7) | [`com.mparticle:leanplum-7`](https://central.sonatype.com/artifact/com.mparticle/leanplum-7) | +| [Localytics](kits/localytics/localytics-6) | [`com.mparticle:localytics-6`](https://central.sonatype.com/artifact/com.mparticle/localytics-6) | +| [OneTrust](kits/onetrust/onetrust) | [`com.mparticle:onetrust`](https://central.sonatype.com/artifact/com.mparticle/onetrust) | +| [Optimizely](kits/optimizely/optimizely-3) | [`com.mparticle:optimizely-3`](https://central.sonatype.com/artifact/com.mparticle/optimizely-3) | +| [Radar](kits/radar/radar-3) | [`com.mparticle:radar-3`](https://central.sonatype.com/artifact/com.mparticle/radar-3) | +| [Rokt](kits/rokt/rokt) | [`com.mparticle:android-rokt-kit`](https://central.sonatype.com/artifact/com.mparticle/android-rokt-kit) | +| [Singular](kits/singular/singular-12) | [`com.mparticle:singular-12`](https://central.sonatype.com/artifact/com.mparticle/singular-12) | +| [Urban Airship](kits/urbanairship/urbanairship-20) | [`com.mparticle:urbanairship-20`](https://central.sonatype.com/artifact/com.mparticle/urbanairship-20) | ### Google Play Services Ads diff --git a/RELEASE.md b/RELEASE.md index 11b0971f4..e277153e8 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -13,7 +13,7 @@ Use `Release - Draft` to prepare a release PR. The workflow: 1. Reads the current version from `VERSION`. 2. Computes the next release version from `bump-type` and optional `qualifier`. 3. Writes the computed version back to `VERSION`. -4. Publishes to Maven local as a smoke test. +4. Publishes core, aggregate kits, and isolated kits to Maven local as a smoke test. 5. Generates the changelog entry. 6. Opens a PR back into the branch selected in the workflow dispatch UI. @@ -26,7 +26,7 @@ Generated release PR branches use `release/prep-`, for example `release - `main` - `workstation/*` -The workflow publishes the SDK and kits to Maven Central using the exact version in `VERSION`, then creates a GitHub release with the same tag. +The workflow validates every publication in Maven local before publishing the SDK, aggregate kits, and isolated kits to Maven Central using the exact version in `VERSION`. It creates a GitHub release with the same tag only after every publication succeeds. ## Stable releases @@ -70,7 +70,9 @@ After a successful publish workflow, verify: 1. The GitHub release exists with the expected tag. 2. The SDK artifact is present in [Sonatype](https://central.sonatype.com/publishing). 3. The kit artifacts are present in [Sonatype](https://central.sonatype.com/publishing). -4. Pre-release tags are marked as pre-releases and stable tags are marked as latest. +4. `urbanairship-20`, `braze-43`, `ga-23`, and `ga4-23` are present at the release version. +5. Every kit POM depends on `android-kit-base` at the exact release version. +6. Pre-release tags are marked as pre-releases and stable tags are marked as latest. ## Troubleshooting diff --git a/buildSrc/build.gradle.kts b/build-logic/build.gradle.kts similarity index 84% rename from buildSrc/build.gradle.kts rename to build-logic/build.gradle.kts index b2502fb71..1aff6b341 100644 --- a/buildSrc/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -21,8 +21,6 @@ tasks.withType().configureEach { } dependencies { - implementation("com.android.tools.build:gradle:8.3.2") - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.20") implementation("com.vanniktech:gradle-maven-publish-plugin:0.31.0") } diff --git a/buildSrc/src/main/kotlin/AndroidLibraryMavenCentralPublishPlugin.kt b/build-logic/src/main/kotlin/AndroidLibraryMavenCentralPublishPlugin.kt similarity index 100% rename from buildSrc/src/main/kotlin/AndroidLibraryMavenCentralPublishPlugin.kt rename to build-logic/src/main/kotlin/AndroidLibraryMavenCentralPublishPlugin.kt diff --git a/buildSrc/src/main/kotlin/com/mparticle/MavenCentralPublish.kt b/build-logic/src/main/kotlin/com/mparticle/MavenCentralPublish.kt similarity index 94% rename from buildSrc/src/main/kotlin/com/mparticle/MavenCentralPublish.kt rename to build-logic/src/main/kotlin/com/mparticle/MavenCentralPublish.kt index a9a15dc2e..e7cc9bdf1 100644 --- a/buildSrc/src/main/kotlin/com/mparticle/MavenCentralPublish.kt +++ b/build-logic/src/main/kotlin/com/mparticle/MavenCentralPublish.kt @@ -8,6 +8,7 @@ import org.gradle.api.Project import org.gradle.api.publish.PublishingExtension import org.gradle.api.publish.maven.MavenPublication import org.gradle.api.publish.maven.tasks.PublishToMavenLocal +import org.gradle.api.publish.maven.tasks.PublishToMavenRepository import org.gradle.jvm.tasks.Jar fun Project.configureMavenPublishing(mparticleMavenPublish: MParticleMavenPublishExtension) { @@ -100,6 +101,12 @@ fun Project.configureMavenPublishing(mparticleMavenPublish: MParticleMavenPublis dependsOn(validateTaskName) } } + + tasks.withType(PublishToMavenRepository::class.java).configureEach { + if (name.contains(publicationName, ignoreCase = true)) { + dependsOn(validateTaskName) + } + } } } diff --git a/buildSrc/src/main/kotlin/com/mparticle/ValidatePomTask.kt b/build-logic/src/main/kotlin/com/mparticle/ValidatePomTask.kt similarity index 100% rename from buildSrc/src/main/kotlin/com/mparticle/ValidatePomTask.kt rename to build-logic/src/main/kotlin/com/mparticle/ValidatePomTask.kt diff --git a/buildSrc/src/main/kotlin/com/mparticle/publish/MParticleMavenPublishExtension.kt b/build-logic/src/main/kotlin/com/mparticle/publish/MParticleMavenPublishExtension.kt similarity index 100% rename from buildSrc/src/main/kotlin/com/mparticle/publish/MParticleMavenPublishExtension.kt rename to build-logic/src/main/kotlin/com/mparticle/publish/MParticleMavenPublishExtension.kt diff --git a/build.gradle b/build.gradle index d6bab31e2..55166e59d 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,7 @@ buildscript { } plugins { + id "mparticle.android.library.publish" apply false id "org.sonarqube" version "3.5.0.2730" id "org.jlleitschuh.gradle.ktlint" version "13.0.0" } diff --git a/kit-plugin/src/main/groovy/com/mparticle/kits/KitPlugin.groovy b/kit-plugin/src/main/groovy/com/mparticle/kits/KitPlugin.groovy index 9c5cf7c53..448b97c29 100644 --- a/kit-plugin/src/main/groovy/com/mparticle/kits/KitPlugin.groovy +++ b/kit-plugin/src/main/groovy/com/mparticle/kits/KitPlugin.groovy @@ -43,9 +43,8 @@ class KitPlugin implements Plugin { jvmArgs += ['--add-opens', 'java.base/java.util.concurrent=ALL-UNNAMED'] } - // mparticle.android.library.publish is only available when building inside the - // monorepo (buildSrc on classpath). Standalone kit builds and test fixtures skip - // Maven publishing configuration — kits will be migrated to the monorepo. + // The publication convention is available to monorepo builds and maintained standalone + // kits that include the shared build logic. External kit builds can omit it. try { target.apply(plugin: 'mparticle.android.library.publish') def publishExt = target.extensions.getByName('mparticleMavenPublish') @@ -101,4 +100,3 @@ class KitPlugin implements Plugin { } } } - diff --git a/kits/braze/braze-43/README.md b/kits/braze/braze-43/README.md index 5fd07bde5..ede8cf3df 100644 --- a/kits/braze/braze-43/README.md +++ b/kits/braze/braze-43/README.md @@ -54,7 +54,7 @@ This repository contains an [example app](example) showing how to implement mPar ```groovy dependencies { - implementation 'com.mparticle:braze-43:6+' + implementation 'com.mparticle:braze-43:6.0.1' } ``` diff --git a/kits/braze/braze-43/build.gradle b/kits/braze/braze-43/build.gradle index 204b278ce..20e340a0a 100644 --- a/kits/braze/braze-43/build.gradle +++ b/kits/braze/braze-43/build.gradle @@ -1,6 +1,8 @@ buildscript { ext.kotlin_version = '2.2.20' - if (!project.hasProperty('version') || project.version.equals('unspecified')) { + if (project.hasProperty('VERSION')) { + project.version = project.property('VERSION') + } else if (!project.hasProperty('version') || project.version.equals('unspecified')) { project.version = '+' } @@ -17,6 +19,7 @@ buildscript { } plugins { + id "mparticle.android.library.publish" apply false id "org.sonarqube" version "3.5.0.2730" id "org.jlleitschuh.gradle.ktlint" version "13.0.0" } @@ -33,13 +36,9 @@ apply plugin: 'org.jlleitschuh.gradle.ktlint' apply plugin: 'kotlin-android' apply plugin: 'com.mparticle.kit' -// Standalone builds use rootProject.name "android-braze-kit"; force the published -// Maven coordinate consumers expect (com.mparticle:braze-43). -if (extensions.findByName('mparticleMavenPublish') != null) { - mparticleMavenPublish { - artifactId.set('braze-43') - description.set('Braze 43 kit for the mParticle SDK') - } +mparticleMavenPublish { + artifactId.set('braze-43') + description.set('Braze 43 kit for the mParticle SDK') } android { diff --git a/kits/braze/braze-43/settings.gradle.kts b/kits/braze/braze-43/settings.gradle.kts index 73fac53ee..a3a8b2f58 100644 --- a/kits/braze/braze-43/settings.gradle.kts +++ b/kits/braze/braze-43/settings.gradle.kts @@ -1,2 +1,6 @@ -rootProject.name = "android-braze-kit" +pluginManagement { + includeBuild("../../../build-logic") +} + +rootProject.name = "braze-43" include(":") diff --git a/kits/ga/ga-23/README.md b/kits/ga/ga-23/README.md index b9f0fa3d2..b6c3f9c27 100644 --- a/kits/ga/ga-23/README.md +++ b/kits/ga/ga-23/README.md @@ -10,10 +10,12 @@ This repository contains the [Google Analytics for Firebase](https://firebase.go ```groovy dependencies { - implementation 'com.mparticle:android-googleanalyticsfirebase-kit:5+' + implementation 'com.mparticle:ga-23:6.0.1' } ``` + SDK 5.x releases use the legacy `com.mparticle:android-googleanalyticsfirebase-kit` coordinate. + 2. Follow the mParticle Android SDK [quick-start](https://github.com/mParticle/mparticle-android-sdk), then rebuild and launch your app, and verify that you see `"Google Analytics for Firebase detected"` in the output of `adb logcat`. 3. Reference mParticle's integration docs below to enable the integration. diff --git a/kits/ga/ga-23/build.gradle b/kits/ga/ga-23/build.gradle index d8041845d..be4816ebb 100644 --- a/kits/ga/ga-23/build.gradle +++ b/kits/ga/ga-23/build.gradle @@ -1,6 +1,8 @@ buildscript { ext.kotlin_version = '2.2.20' - if (!project.hasProperty('version') || project.version.equals('unspecified')) { + if (project.hasProperty('VERSION')) { + project.version = project.property('VERSION') + } else if (!project.hasProperty('version') || project.version.equals('unspecified')) { project.version = '+' } @@ -19,6 +21,7 @@ buildscript { } plugins { + id "mparticle.android.library.publish" apply false id "org.sonarqube" version "3.5.0.2730" id "org.jlleitschuh.gradle.ktlint" version "13.0.0" } @@ -35,6 +38,11 @@ apply plugin: 'org.jlleitschuh.gradle.ktlint' apply plugin: 'kotlin-android' apply plugin: 'com.mparticle.kit' +mparticleMavenPublish { + artifactId.set('ga-23') + description.set('Google Analytics for Firebase 23 kit for the mParticle SDK') +} + android { namespace 'com.mparticle.kits.googleanalyticsfirebase' buildFeatures { diff --git a/kits/ga/ga-23/settings.gradle.kts b/kits/ga/ga-23/settings.gradle.kts index 2af3e41c8..a1c4061fa 100644 --- a/kits/ga/ga-23/settings.gradle.kts +++ b/kits/ga/ga-23/settings.gradle.kts @@ -1,2 +1,6 @@ -rootProject.name = "android-googleanalyticsfirebase-kit" +pluginManagement { + includeBuild("../../../build-logic") +} + +rootProject.name = "ga-23" include(":") diff --git a/kits/ga4/ga4-23/README.md b/kits/ga4/ga4-23/README.md index 10db824fe..73564b7ce 100644 --- a/kits/ga4/ga4-23/README.md +++ b/kits/ga4/ga4-23/README.md @@ -8,10 +8,12 @@ This repository contains the [Firebase for GA4](https://firebase.google.com/docs ```groovy dependencies { - implementation 'com.mparticle:android-googleanalyticsfirebasega4-kit:5+' + implementation 'com.mparticle:ga4-23:6.0.1' } ``` + SDK 5.x releases use the legacy `com.mparticle:android-googleanalyticsfirebasega4-kit` coordinate. + 2. Follow the mParticle Android SDK [quick-start](https://github.com/mParticle/mparticle-android-sdk), then rebuild and launch your app, and verify that you see `"GA4 for Firebase detected"` in the output of `adb logcat`. 3. Reference mParticle's integration docs below to enable the integration. diff --git a/kits/ga4/ga4-23/build.gradle b/kits/ga4/ga4-23/build.gradle index df0e2f9fb..d4bd5f83f 100644 --- a/kits/ga4/ga4-23/build.gradle +++ b/kits/ga4/ga4-23/build.gradle @@ -1,6 +1,8 @@ buildscript { ext.kotlin_version = '2.2.20' - if (!project.hasProperty('version') || project.version.equals('unspecified')) { + if (project.hasProperty('VERSION')) { + project.version = project.property('VERSION') + } else if (!project.hasProperty('version') || project.version.equals('unspecified')) { project.version = '+' } @@ -19,6 +21,7 @@ buildscript { } plugins { + id "mparticle.android.library.publish" apply false id "org.sonarqube" version "3.5.0.2730" id "org.jlleitschuh.gradle.ktlint" version "13.0.0" } @@ -35,6 +38,11 @@ apply plugin: 'org.jlleitschuh.gradle.ktlint' apply plugin: 'kotlin-android' apply plugin: 'com.mparticle.kit' +mparticleMavenPublish { + artifactId.set('ga4-23') + description.set('Google Analytics 4 for Firebase 23 kit for the mParticle SDK') +} + android { namespace 'com.mparticle.kits.googleanalyticsfirebasega4' buildFeatures { diff --git a/kits/ga4/ga4-23/settings.gradle.kts b/kits/ga4/ga4-23/settings.gradle.kts index bf8710ebe..d8941839e 100644 --- a/kits/ga4/ga4-23/settings.gradle.kts +++ b/kits/ga4/ga4-23/settings.gradle.kts @@ -1,2 +1,6 @@ -rootProject.name = "android-googleanalyticsfirebasega4-kit" +pluginManagement { + includeBuild("../../../build-logic") +} + +rootProject.name = "ga4-23" include(":") diff --git a/kits/urbanairship/urbanairship-20/README.md b/kits/urbanairship/urbanairship-20/README.md index bd65fceef..b3e4a02d0 100755 --- a/kits/urbanairship/urbanairship-20/README.md +++ b/kits/urbanairship/urbanairship-20/README.md @@ -8,9 +8,10 @@ This repository contains the [Urban Airship](https://www.urbanairship.com) integ ```groovy dependencies { - implementation 'com.mparticle:android-urbanairship-kit:5+' + implementation 'com.mparticle:urbanairship-20:6.0.1' } ``` + SDK 5.x releases use the legacy `com.mparticle:android-urbanairship-kit` coordinate. 2. Follow the mParticle Android SDK [quick-start](https://github.com/mParticle/mparticle-android-sdk), then rebuild and launch your app, and verify that you see `"Urban Airship detected"` in the output of `adb logcat`. 3. Reference mParticle's integration docs below to enable the integration. 4. If you wish to utilize Urban Airship's Push Messaging capabilities, please refer to the Push Message Considerations section below diff --git a/kits/urbanairship/urbanairship-20/build.gradle b/kits/urbanairship/urbanairship-20/build.gradle index 89ed818b8..daa6d0ead 100644 --- a/kits/urbanairship/urbanairship-20/build.gradle +++ b/kits/urbanairship/urbanairship-20/build.gradle @@ -1,6 +1,8 @@ buildscript { ext.kotlin_version = '2.2.20' - if (!project.hasProperty('version') || project.version.equals('unspecified')) { + if (project.hasProperty('VERSION')) { + project.version = project.property('VERSION') + } else if (!project.hasProperty('version') || project.version.equals('unspecified')) { project.version = '+' } @@ -18,6 +20,7 @@ buildscript { } plugins { + id "mparticle.android.library.publish" apply false id "org.sonarqube" version "3.5.0.2730" id "org.jlleitschuh.gradle.ktlint" version "13.0.0" } @@ -34,6 +37,11 @@ apply plugin: 'org.jlleitschuh.gradle.ktlint' apply plugin: 'kotlin-android' apply plugin: 'com.mparticle.kit' +mparticleMavenPublish { + artifactId.set('urbanairship-20') + description.set('Urban Airship 20 kit for the mParticle SDK') +} + android { namespace 'com.mparticle.kits.urbanairship' compileSdk = 36 diff --git a/kits/urbanairship/urbanairship-20/settings.gradle.kts b/kits/urbanairship/urbanairship-20/settings.gradle.kts index 7d89e39a9..9855e09c3 100644 --- a/kits/urbanairship/urbanairship-20/settings.gradle.kts +++ b/kits/urbanairship/urbanairship-20/settings.gradle.kts @@ -1,2 +1,6 @@ -rootProject.name = "android-urbanairship-kit" +pluginManagement { + includeBuild("../../../build-logic") +} + +rootProject.name = "urbanairship-20" include(":") diff --git a/settings-kits.gradle b/settings-kits.gradle index 482741b1b..0342ddfb7 100644 --- a/settings-kits.gradle +++ b/settings-kits.gradle @@ -1,3 +1,7 @@ +settings.pluginManagement { + includeBuild('build-logic') +} + //keep things alphabetical like readme include ( diff --git a/settings-rokt-sdk-plus.gradle b/settings-rokt-sdk-plus.gradle index b813c235c..e9fdef84b 100644 --- a/settings-rokt-sdk-plus.gradle +++ b/settings-rokt-sdk-plus.gradle @@ -1,3 +1,7 @@ +pluginManagement { + includeBuild('build-logic') +} + // Isolated settings for the `com.rokt:rokt-sdk-plus` umbrella artifact. // // rokt-sdk-plus is intentionally kept OUT of the main settings.gradle so it is not picked up diff --git a/settings.gradle b/settings.gradle index bdf797696..ab955d939 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,6 @@ pluginManagement { + includeBuild('build-logic') + buildscript { repositories { mavenCentral() @@ -22,4 +24,4 @@ include ':android-core', project(':kit-plugin').name = 'android-kit-plugin' -project(':tooling:android-plugin').name = 'android-plugin' \ No newline at end of file +project(':tooling:android-plugin').name = 'android-plugin'