Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: prepare module for maven release #88

Merged
merged 20 commits into from
Dec 18, 2024

Conversation

1abhishekpandey
Copy link
Contributor

@1abhishekpandey 1abhishekpandey commented Dec 13, 2024

Description

  • Added support to publish android and core modules to maven.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactor/optimization

Implementation Details

  • Configured the android and core modules for releases.
  • Added LICENSE.md file.
  • Android: Added following permissions:
    • ACCESS_NETWORK_STATE: Needed to access the network state.
    • INTERNET: Needed to send events from the android SDK.
  • Root build.gradle.kts file:
    • Added group and version for all the modules. (We might need to change it in the future, when integration modules will be added!)
    • Nexus publishing!
  • In RudderStackBuildConfig.kt refactored the quotes around VERSION_NAME, so that we could utilise this the same value in root.build.gradle.kts file for android and core modules versions.
  • Updated POM information in the gradle.properties. (We need to update this info in future, after we update the repository name!)
  • Added publishing.gradle.kts: Responsible to upload the modules to the maven.

Checklist

  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation (if appropriate).
  • I have ensured that my code follows the project's code style.
  • I have checked for potential performance impacts and optimized if necessary.
  • I have checked the code for security issues.
  • I have updated the changelog (if required).

How to test?

  • First clean and build: ./gradlew clean build
  • Setup: NEXUS_USERNAME, NEXUS_PASSWORD and SONATYPE_STAGING_PROFILE_ID as environment variables.
  • Publish snapshot: ./gradlew publishToSonatype

Here, what it looks like if publish is successful!
image

Verify it here: https://s01.oss.sonatype.org/#nexus-search;gav~com.rudderstack.sdk.kotlin~~~~.

Breaking Changes

Maintainers Checklist

  • The code has been reviewed.
  • CI tests have passed.
  • All necessary documentation has been updated.

Screenshots (if applicable)

Core:

image

Android:

image

Additional Context

NOTE: We are publishing: aar (android), jar (core), sourcesJar (both) and javadocJar (both).

To release new versions, update the following values: VERSION_NAME and VERSION_CODE at both gradle.properties and RudderStackBuildConfig. Then run ./gradlew publishToSonatype.

@1abhishekpandey 1abhishekpandey self-assigned this Dec 13, 2024
Copy link

linear bot commented Dec 13, 2024

SDK-2730 [Android] Preparing for release

Description

In this ticket we are preparing the new Android/Kotlin SDK for a snapshot release. The things we need to prepare are:

Tech design / Research

ChatGpt:

The Firebase team utilizes a coordinated release process for their Android SDKs:

Unified Releases: Core modules and their associated components are released together, ensuring compatibility and stability across the SDK.

Independent Module Updates: Integration modules or features that are decoupled from the core can be updated and released separately. This modular approach allows for flexibility in addressing specific updates or bug fixes without necessitating a full SDK release.

GROUP_ID= com.rudderstack.sdk.kotlin

Artifact_ID= android and core

Version= alpha -> beta -> stable

modules: com.rudderstack.sdk.kotlin:android:<version> com.rudderstack.sdk.kotlin:core:<version>

packages: com.rudderstack.sdk.kotlin.android com.rudderstack.sdk.kotlin.core

Research doc: https://www.notion.so/rudderstacks/Android-Kotlin-SDK-15bf2b415dd080598959f2d7fe3415e4

**
Acceptance Criteria**

  • Refactor the package name
  • Create the new gradle.kts for release
  • Cleanup
  • Try a sample / snapshot release
  • Create a sample github

**
Checklist:**

  • Implementation of the solution
  • Unit tests added
  • End to End cases added
    • Sample application changes
  • Meets acceptance criteria
  • Test on different OS versions
  • Developer tested feature
  • Documentation
    • Process with DOCS team initiated
    • Documentation reviewed and approved
  • PR opened
    • Code Review approved
  • Product owner approval
  • TAMs informed about changes
  • Feature merged
    • Develop
    • Main

@1abhishekpandey 1abhishekpandey merged commit 994294a into develop.poc Dec 18, 2024
2 checks passed
@1abhishekpandey 1abhishekpandey deleted the feat/sdk-2730-prepare-publishing-plugins branch December 18, 2024 06:48
@1abhishekpandey 1abhishekpandey restored the feat/sdk-2730-prepare-publishing-plugins branch December 19, 2024 08:14
@1abhishekpandey 1abhishekpandey deleted the feat/sdk-2730-prepare-publishing-plugins branch December 19, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants