-
Notifications
You must be signed in to change notification settings - Fork 43
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
ext.versions = [ | ||
gradlePluginVersion: '7.0.3', | ||
compileSdk : 30, | ||
minSdk : 19, // Also update 'android/src/main/AndroidManifest.xml#minSdkVersion' value | ||
targetSdk : 30, // Also update 'android/src/main/AndroidManifest.xml#targetSdkVersion' value | ||
buildTools : '30.0.3', | ||
kotlinVersion : '1.6.10', | ||
ndkVersion : "21.4.7075529", | ||
javaVersion : JavaVersion.VERSION_1_8 | ||
] | ||
ext { | ||
versions = [ | ||
gradlePluginVersion: '7.0.3', | ||
compileSdk : 30, | ||
minSdk : 19, // Also update 'android/src/main/AndroidManifest.xml#minSdkVersion' value | ||
targetSdk : 30, // Also update 'android/src/main/AndroidManifest.xml#targetSdkVersion' value | ||
buildTools : '30.0.3', | ||
kotlinVersion : '1.6.10', | ||
ndkVersion : "21.4.7075529", | ||
javaVersion : JavaVersion.VERSION_1_8, | ||
versionCode : 10300, // Also update 'src/main/AndroidManifest.xml#versionCode' value | ||
versionName : '1.3.0.beta', // Also update 'src/main/AndroidManifest.xml#versionName' value | ||
godotVersion : '3.5.0.beta', | ||
] | ||
|
||
PUBLISH_ARTIFACT_ID = 'godot-openxr' | ||
STUB_PUBLISH_ARTIFACT_ID = PUBLISH_ARTIFACT_ID + "-stub" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
group = ossrhGroupId | ||
version = versions.versionName | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
fullRelease(MavenPublication) { | ||
from components.fullRelease | ||
|
||
// The coordinates of the library, being set from variables that | ||
// we'll set up later | ||
groupId ossrhGroupId | ||
artifactId PUBLISH_ARTIFACT_ID | ||
version versions.versionName | ||
|
||
// Mostly self-explanatory metadata | ||
pom { | ||
name = PUBLISH_ARTIFACT_ID | ||
description = 'Godot OpenXR Android Library' | ||
url = 'https://docs.godotengine.org/en/stable/tutorials/vr/openxr/index.html' | ||
licenses { | ||
license { | ||
name = 'MIT License' | ||
url = 'https://github.com/GodotVR/godot_openxr/blob/master/LICENSE' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'm4gr3d' | ||
name = 'Fredia Huya-Kouadio' | ||
email = 'fhuyakou@gmail.com' | ||
} | ||
developer { | ||
id = 'BastiaanOlij' | ||
name = 'Bastiaan Olij' | ||
email = 'mux213@gmail.com' | ||
} | ||
developer { | ||
id = 'ChristophHaag' | ||
name = 'Christoph Haag' | ||
email = 'haagch@frickel.club' | ||
} | ||
// Add all other devs here... | ||
} | ||
|
||
// Version control info - if you're using GitHub, follow the | ||
// format as seen here | ||
scm { | ||
connection = 'scm:git:github.com/GodotVR/godot_openxr.git' | ||
developerConnection = 'scm:git:ssh://github.com/GodotVR/godot_openxr.git' | ||
url = 'https://github.com/GodotVR/godot_openxr/tree/master' | ||
} | ||
} | ||
} | ||
|
||
stubRelease(MavenPublication) { | ||
from components.stubRelease | ||
|
||
// The coordinates of the library, being set from variables that | ||
// we'll set up later | ||
groupId ossrhGroupId | ||
artifactId STUB_PUBLISH_ARTIFACT_ID | ||
version versions.versionName | ||
|
||
// Mostly self-explanatory metadata | ||
pom { | ||
name = STUB_PUBLISH_ARTIFACT_ID | ||
description = 'Godot OpenXR Android (Stub) Library' | ||
url = 'https://docs.godotengine.org/en/stable/tutorials/vr/openxr/index.html' | ||
licenses { | ||
license { | ||
name = 'MIT License' | ||
url = 'https://github.com/GodotVR/godot_openxr/blob/master/LICENSE' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'm4gr3d' | ||
name = 'Fredia Huya-Kouadio' | ||
email = 'fhuyakou@gmail.com' | ||
} | ||
developer { | ||
id = 'BastiaanOlij' | ||
name = 'Bastiaan Olij' | ||
email = 'mux213@gmail.com' | ||
} | ||
developer { | ||
id = 'ChristophHaag' | ||
name = 'Christoph Haag' | ||
email = 'haagch@frickel.club' | ||
} | ||
// Add all other devs here... | ||
} | ||
|
||
// Version control info - if you're using GitHub, follow the | ||
// format as seen here | ||
scm { | ||
connection = 'scm:git:github.com/GodotVR/godot_openxr.git' | ||
developerConnection = 'scm:git:ssh://github.com/GodotVR/godot_openxr.git' | ||
url = 'https://github.com/GodotVR/godot_openxr/tree/master' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys( | ||
rootProject.ext["signing.keyId"], | ||
rootProject.ext["signing.key"], | ||
rootProject.ext["signing.password"], | ||
) | ||
sign publishing.publications | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Create variables with empty default values | ||
ext["signing.keyId"] = '' | ||
ext["signing.password"] = '' | ||
ext["signing.key"] = '' | ||
ext["ossrhGroupId"] = '' | ||
ext["ossrhUsername"] = '' | ||
ext["ossrhPassword"] = '' | ||
ext["sonatypeStagingProfileId"] = '' | ||
|
||
File secretPropsFile = project.rootProject.file('local.properties') | ||
if (secretPropsFile.exists()) { | ||
// Read local.properties file first if it exists | ||
Properties p = new Properties() | ||
new FileInputStream(secretPropsFile).withCloseable { is -> p.load(is) } | ||
p.each { name, value -> ext[name] = value } | ||
} else { | ||
// Use system environment variables | ||
ext["ossrhGroupId"] = System.getenv('OSSRH_GROUP_ID') | ||
ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME') | ||
ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD') | ||
ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID') | ||
ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') | ||
ext["signing.password"] = System.getenv('SIGNING_PASSWORD') | ||
ext["signing.key"] = System.getenv('SIGNING_KEY') | ||
} | ||
|
||
// Set up Sonatype repository | ||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
stagingProfileId = sonatypeStagingProfileId | ||
username = ossrhUsername | ||
password = ossrhPassword | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
} | ||
} | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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>
.There was a problem hiding this comment.
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.