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

Add logic to publish the Godot OpenXR Android library to MavenCentral #188

Merged
merged 1 commit into from
Mar 16, 2022

Conversation

m4gr3d
Copy link
Collaborator

@m4gr3d m4gr3d commented Mar 14, 2022

This PR follows the instructions from https://getstream.io/blog/publishing-libraries-to-mavencentral-2021/ to setup the logic to publish the Godot OpenXR Android Library to MavenCentral.

MavenCentral is a repository provided by the Maven community which contains a large number of commonly used libraries.
It's an important tool for java and Android developers as it simplifies the resolution and fetching process for a project's dependencies by build tools like Gradle.

The updated logic will enable to push (automatically) the generated Godot OpenXR Android library to MavenCentral so that users can access it by adding a single line to their gradle build file:

dependencies {
    ...
    implementation 'io.github.m4gr3d:godot-openxr:<versions>'
    ...
}

Publishing To MavenCentral

  • This requires a sonatype account and a GPG key to sign the generated library.
  • Provide values for the variables defined in publish-root.gradle. This can either be done via environment variables, or through the local.properties file (that file is not and should not be added to git).
  • Generate the Godot OpenXR Android library via the usual build process.
  • Run the following commands to push the generated library to MavenCentral:
    • ./gradlew publishFullReleasePublicationToSonatypeRepository
  • Follow these steps to review the uploaded binary and release it publicly on MavenCentral.

Notes & TODOs

  • I'm using my own sonatype credentials at the moment to publish the library. Eventually, we would want to switch to GodotVR's own set of credentials.
  • Automatic publishing is blocked by above todo. Once we have a set of credentials for GodotVR, we can automate the publishing of the Godot Android Library by leveraging github workflows as described here.
  • Update OpenXR Android related documentation accordingly.

Part of #191

@m4gr3d m4gr3d added enhancement New feature or request android Applies specifically to Android OS labels Mar 14, 2022
@m4gr3d m4gr3d added this to the 1.3.0 milestone Mar 14, 2022
@m4gr3d m4gr3d requested a review from BastiaanOlij March 14, 2022 22:19
@m4gr3d m4gr3d force-pushed the setup_mavencentral_publishing branch 5 times, most recently from 013ceac to 6fda84f Compare March 15, 2022 01:13
@m4gr3d m4gr3d force-pushed the setup_mavencentral_publishing branch from 6fda84f to ff0b44b Compare March 15, 2022 01:47
compileOnly(fileTree(dir: "libs", include: ["godot-lib*.aar"]))
}

implementation "io.github.m4gr3d:godot:${versions.godotVersion}"
Copy link
Member

@BastiaanOlij BastiaanOlij Mar 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be m4gr3d? not GodotVR once merged?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the dependency for the Godot Android library. For now until godotengine/godot-proposals#4230 is completed, I'm using my own sonatype account hence why it's io.github.m4gr3d.

Once godotengine/godot-proposals#4230 is complete, it will be switched to something like org.godotengine:godot:<version>.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi, I've added #191 to track the remaining steps.

Copy link
Member

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@m4gr3d m4gr3d merged commit dc02283 into GodotVR:master Mar 16, 2022
@m4gr3d m4gr3d deleted the setup_mavencentral_publishing branch March 16, 2022 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Applies specifically to Android OS enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants